LLVM  12.0.0git
Classes | Public Member Functions | Public Attributes | List of all members
llvm::remarks::BitstreamRemarkParserHelper Struct Reference

Helper to parse a REMARK_BLOCK for a bitstream remark container. More...

#include "llvm/Remarks/BitstreamRemarkParser.h"

Collaboration diagram for llvm::remarks::BitstreamRemarkParserHelper:
Collaboration graph
[legend]

Classes

struct  Argument
 

Public Member Functions

 BitstreamRemarkParserHelper (BitstreamCursor &Stream)
 Continue parsing with Stream. More...
 
Error parse ()
 Parse the REMARK_BLOCK and fill the available entries. More...
 

Public Attributes

BitstreamCursorStream
 The Bitstream reader. More...
 
Optional< uint8_t > Type
 The parsed content: depending on the remark, some fields might be empty. More...
 
Optional< uint64_t > RemarkNameIdx
 
Optional< uint64_t > PassNameIdx
 
Optional< uint64_t > FunctionNameIdx
 
Optional< uint64_t > SourceFileNameIdx
 
Optional< uint32_tSourceLine
 
Optional< uint32_tSourceColumn
 
Optional< uint64_t > Hotness
 
Optional< ArrayRef< Argument > > Args
 
SmallVector< Argument, 8 > TmpArgs
 Avoid re-allocating a vector every time. More...
 

Detailed Description

Helper to parse a REMARK_BLOCK for a bitstream remark container.

Definition at line 54 of file BitstreamRemarkParser.h.

Constructor & Destructor Documentation

◆ BitstreamRemarkParserHelper()

BitstreamRemarkParserHelper::BitstreamRemarkParserHelper ( BitstreamCursor Stream)

Continue parsing with Stream.

Stream is expected to contain a ENTER_SUBBLOCK to the REMARK_BLOCK at the current position. Stream is expected to have a BLOCKINFO_BLOCK set and to have already parsed the META_BLOCK.

Definition at line 84 of file BitstreamRemarkParser.cpp.

Member Function Documentation

◆ parse()

Error BitstreamRemarkParserHelper::parse ( )

Parse the REMARK_BLOCK and fill the available entries.

This helper does not check for the validity of the fields.

Definition at line 205 of file BitstreamRemarkParser.cpp.

References parseBlock(), and llvm::remarks::REMARK_BLOCK_ID.

Referenced by llvm::remarks::BitstreamRemarkParser::parseRemark().

Member Data Documentation

◆ Args

Optional<ArrayRef<Argument> > llvm::remarks::BitstreamRemarkParserHelper::Args

◆ FunctionNameIdx

Optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::FunctionNameIdx

◆ Hotness

Optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::Hotness

◆ PassNameIdx

Optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::PassNameIdx

◆ RemarkNameIdx

Optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::RemarkNameIdx

◆ SourceColumn

Optional<uint32_t> llvm::remarks::BitstreamRemarkParserHelper::SourceColumn

◆ SourceFileNameIdx

Optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::SourceFileNameIdx

◆ SourceLine

Optional<uint32_t> llvm::remarks::BitstreamRemarkParserHelper::SourceLine

◆ Stream

BitstreamCursor& llvm::remarks::BitstreamRemarkParserHelper::Stream

The Bitstream reader.

Definition at line 56 of file BitstreamRemarkParser.h.

Referenced by parseBlock(), and parseRecord().

◆ TmpArgs

SmallVector<Argument, 8> llvm::remarks::BitstreamRemarkParserHelper::TmpArgs

Avoid re-allocating a vector every time.

Definition at line 75 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ Type

Optional<uint8_t> llvm::remarks::BitstreamRemarkParserHelper::Type

The parsed content: depending on the remark, some fields might be empty.

Definition at line 58 of file BitstreamRemarkParser.h.

Referenced by parseRecord(), and llvm::remarks::BitstreamRemarkParser::parseRemark().


The documentation for this struct was generated from the following files: