LLVM  12.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< boolisMetaBlock ()
 Return true if the next block is a META_BLOCK. More...
 
Expected< boolisRemarkBlock ()
 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 209 of file BitstreamRemarkParser.cpp.

Referenced by processRemarkVersion().

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

◆ 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 273 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 277 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 212 of file BitstreamRemarkParser.cpp.

References llvm::SimpleBitstreamCursor::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::SimpleBitstreamCursor::skipToEnd().

Member Data Documentation

◆ BlockInfo

BitstreamBlockInfo llvm::remarks::BitstreamParserHelper::BlockInfo

The block info block.

Definition at line 93 of file BitstreamRemarkParser.h.

Referenced by parseBlockInfoBlock().

◆ Stream

BitstreamCursor llvm::remarks::BitstreamParserHelper::Stream

The Bitstream reader.

Definition at line 91 of file BitstreamRemarkParser.h.

Referenced by isMetaBlock(), isRemarkBlock(), parseBlockInfoBlock(), and parseMagic().


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