LLVM 20.0.0git
|
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< bool > | isMetaBlock () |
Return true if the next block is a META_BLOCK. | |
Expected< bool > | isRemarkBlock () |
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. | |
Helper to parse any bitstream remark container.
Definition at line 89 of file BitstreamRemarkParser.h.
BitstreamParserHelper::BitstreamParserHelper | ( | StringRef | Buffer | ) |
Start parsing at Buffer
.
Definition at line 210 of file BitstreamRemarkParser.cpp.
|
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().
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().
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.
Error BitstreamParserHelper::parseBlockInfoBlock | ( | ) |
Parse the block info block containing all the abbrevs.
This needs to be called before calling any other parsing function.
Definition at line 223 of file BitstreamRemarkParser.cpp.
References llvm::BitstreamCursor::advance(), BlockInfo, llvm::bitc::BLOCKINFO_BLOCK_ID, llvm::createStringError(), llvm::BitstreamCursor::ReadBlockInfoBlock(), llvm::BitstreamCursor::setBlockInfo(), Stream, llvm::BitstreamEntry::SubBlock, llvm::Error::success(), and llvm::Expected< T >::takeError().
Referenced by advanceToMetaBlock().
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().
|
inline |
Jump to the end of the stream, skipping everything.
Definition at line 110 of file BitstreamRemarkParser.h.
References llvm::BitstreamCursor::skipToEnd(), and Stream.
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().
BitstreamCursor llvm::remarks::BitstreamParserHelper::Stream |
The Bitstream reader.
Definition at line 91 of file BitstreamRemarkParser.h.
Referenced by atEndOfStream(), isMetaBlock(), isRemarkBlock(), parseBlockInfoBlock(), parseMagic(), llvm::remarks::BitstreamRemarkParser::parseMeta(), llvm::remarks::BitstreamRemarkParser::parseRemark(), and skipToEnd().