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

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

Public Member Functions

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

Public Attributes

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

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 208 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 272 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 276 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 211 of file BitstreamRemarkParser.cpp.

References i, 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: