LLVM 19.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"

Classes

struct  Argument
 

Public Member Functions

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

Public Attributes

BitstreamCursorStream
 The Bitstream reader.
 
std::optional< uint8_t > Type
 The parsed content: depending on the remark, some fields might be empty.
 
std::optional< uint64_tRemarkNameIdx
 
std::optional< uint64_tPassNameIdx
 
std::optional< uint64_tFunctionNameIdx
 
std::optional< uint64_tSourceFileNameIdx
 
std::optional< uint32_tSourceLine
 
std::optional< uint32_tSourceColumn
 
std::optional< uint64_tHotness
 
std::optional< ArrayRef< Argument > > Args
 
SmallVector< Argument, 8 > TmpArgs
 Avoid re-allocating a vector every time.
 

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 85 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 206 of file BitstreamRemarkParser.cpp.

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

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

Member Data Documentation

◆ Args

std::optional<ArrayRef<Argument> > llvm::remarks::BitstreamRemarkParserHelper::Args

Definition at line 73 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ FunctionNameIdx

std::optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::FunctionNameIdx

Definition at line 61 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ Hotness

std::optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::Hotness

Definition at line 65 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ PassNameIdx

std::optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::PassNameIdx

Definition at line 60 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ RemarkNameIdx

std::optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::RemarkNameIdx

Definition at line 59 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ SourceColumn

std::optional<uint32_t> llvm::remarks::BitstreamRemarkParserHelper::SourceColumn

Definition at line 64 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ SourceFileNameIdx

std::optional<uint64_t> llvm::remarks::BitstreamRemarkParserHelper::SourceFileNameIdx

Definition at line 62 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ SourceLine

std::optional<uint32_t> llvm::remarks::BitstreamRemarkParserHelper::SourceLine

Definition at line 63 of file BitstreamRemarkParser.h.

Referenced by parseRecord().

◆ Stream

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

The Bitstream reader.

Definition at line 56 of file BitstreamRemarkParser.h.

Referenced by 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

std::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().


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