LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::remarks::BitstreamParserHelper Struct Reference

Helper to parse any bitstream remark container. More...

#include "llvm/Remarks/BitstreamRemarkParser.h"

Public Member Functions

 BitstreamParserHelper (StringRef Buffer)
 Start parsing at Buffer.
 
Expected< std::array< char, 4 > > parseMagic ()
 Parse the magic number.
 
Error parseBlockInfoBlock ()
 Parse the block info block containing all the abbrevs.
 
Expected< boolisMetaBlock ()
 Return true if the next block is a META_BLOCK.
 
Expected< boolisRemarkBlock ()
 Return true if the next block is a REMARK_BLOCK.
 
bool atEndOfStream ()
 Return true if the parser reached the end of the stream.
 
void skipToEnd ()
 Jump to the end of the stream, skipping everything.
 

Public Attributes

BitstreamCursor Stream
 The Bitstream reader.
 
BitstreamBlockInfo BlockInfo
 The block info block.
 

Detailed Description

Helper to parse any bitstream remark container.

Definition at line 89 of file BitstreamRemarkParser.h.

Constructor & Destructor Documentation

◆ BitstreamParserHelper()

BitstreamParserHelper::BitstreamParserHelper ( StringRef  Buffer)

Start parsing at Buffer.

Definition at line 210 of file BitstreamRemarkParser.cpp.

Member Function Documentation

◆ atEndOfStream()

bool llvm::remarks::BitstreamParserHelper::atEndOfStream ( )
inline

Return true if the parser reached the end of the stream.

Definition at line 108 of file BitstreamRemarkParser.h.

References llvm::BitstreamCursor::AtEndOfStream(), and Stream.

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

◆ isMetaBlock()

Expected< bool > BitstreamParserHelper::isMetaBlock ( )

Return true if the next block is a META_BLOCK.

This function does not move the cursor.

Definition at line 274 of file BitstreamRemarkParser.cpp.

References isBlock(), llvm::remarks::META_BLOCK_ID, and Stream.

Referenced by advanceToMetaBlock().

◆ isRemarkBlock()

Expected< bool > BitstreamParserHelper::isRemarkBlock ( )

Return true if the next block is a REMARK_BLOCK.

This function does not move the cursor.

Definition at line 278 of file BitstreamRemarkParser.cpp.

References isBlock(), llvm::remarks::META_BLOCK_ID, and Stream.

◆ parseBlockInfoBlock()

Error BitstreamParserHelper::parseBlockInfoBlock ( )

◆ parseMagic()

Expected< std::array< char, 4 > > BitstreamParserHelper::parseMagic ( )

Parse the magic number.

Definition at line 213 of file BitstreamRemarkParser.cpp.

References llvm::BitstreamCursor::Read(), and Stream.

Referenced by advanceToMetaBlock(), and llvm::remarks::createBitstreamParserFromMeta().

◆ skipToEnd()

void llvm::remarks::BitstreamParserHelper::skipToEnd ( )
inline

Jump to the end of the stream, skipping everything.

Definition at line 110 of file BitstreamRemarkParser.h.

References llvm::BitstreamCursor::skipToEnd(), and Stream.

Member Data Documentation

◆ BlockInfo

BitstreamBlockInfo llvm::remarks::BitstreamParserHelper::BlockInfo

The block info block.

Definition at line 93 of file BitstreamRemarkParser.h.

Referenced by parseBlockInfoBlock(), and llvm::remarks::BitstreamRemarkParser::parseMeta().

◆ Stream

BitstreamCursor llvm::remarks::BitstreamParserHelper::Stream

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