LLVM 22.0.0git
BitstreamRemarkParser.cpp File Reference
#include "BitstreamRemarkParser.h"
#include "llvm/Remarks/Remark.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include <optional>

Go to the source code of this file.

Functions

static Error unknownRecord (const char *BlockName, unsigned RecordID)
static Error malformedRecord (const char *BlockName, const char *RecordName)
static Error parseRecord (BitstreamMetaParserHelper &Parser, unsigned Code)
 Parse a record and fill in the fields in the parser.
static Error parseRecord (BitstreamRemarkParserHelper &Parser, unsigned Code)
 Parse a record and fill in the fields in the parser.
template<typename T>
static Error parseBlock (T &ParserHelper, unsigned BlockID, const char *BlockName)
static Expected< boolisBlock (BitstreamCursor &Stream, unsigned BlockID)
static Error validateMagicNumber (StringRef MagicNumber)
static Error advanceToMetaBlock (BitstreamParserHelper &Helper)
static Error processStrTab (BitstreamRemarkParser &P, std::optional< StringRef > StrTabBuf)
static Error processRemarkVersion (BitstreamRemarkParser &P, std::optional< uint64_t > RemarkVersion)

Function Documentation

◆ advanceToMetaBlock()

◆ isBlock()

◆ malformedRecord()

Error malformedRecord ( const char * BlockName,
const char * RecordName )
static

Definition at line 30 of file BitstreamRemarkParser.cpp.

References llvm::createStringError().

Referenced by parseRecord(), and parseRecord().

◆ parseBlock()

◆ parseRecord() [1/2]

◆ parseRecord() [2/2]

◆ processRemarkVersion()

Error processRemarkVersion ( BitstreamRemarkParser & P,
std::optional< uint64_t > RemarkVersion )
static

Definition at line 401 of file BitstreamRemarkParser.cpp.

References llvm::createStringError(), P, and llvm::Error::success().

◆ processStrTab()

Error processStrTab ( BitstreamRemarkParser & P,
std::optional< StringRef > StrTabBuf )
static

Definition at line 390 of file BitstreamRemarkParser.cpp.

References llvm::createStringError(), P, and llvm::Error::success().

◆ unknownRecord()

Error unknownRecord ( const char * BlockName,
unsigned RecordID )
static

Definition at line 23 of file BitstreamRemarkParser.cpp.

References llvm::createStringError().

Referenced by parseRecord(), and parseRecord().

◆ validateMagicNumber()