LLVM 19.0.0git
Functions
BitstreamRemarkParser.cpp File Reference
#include "llvm/Remarks/BitstreamRemarkParser.h"
#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()

static Error advanceToMetaBlock ( BitstreamParserHelper Helper)
static

◆ isBlock()

static Expected< bool > isBlock ( BitstreamCursor Stream,
unsigned  BlockID 
)
static

◆ malformedRecord()

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

Definition at line 31 of file BitstreamRemarkParser.cpp.

References llvm::createStringError().

Referenced by parseRecord().

◆ parseBlock()

template<typename T >
static Error parseBlock ( T ParserHelper,
unsigned  BlockID,
const char BlockName 
)
static

◆ parseRecord() [1/2]

static Error parseRecord ( BitstreamMetaParserHelper Parser,
unsigned  Code 
)
static

◆ parseRecord() [2/2]

static Error parseRecord ( BitstreamRemarkParserHelper Parser,
unsigned  Code 
)
static

◆ processRemarkVersion()

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

Definition at line 405 of file BitstreamRemarkParser.cpp.

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

◆ processStrTab()

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

Definition at line 394 of file BitstreamRemarkParser.cpp.

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

◆ unknownRecord()

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

Definition at line 24 of file BitstreamRemarkParser.cpp.

References llvm::createStringError().

Referenced by parseRecord().

◆ validateMagicNumber()

static Error validateMagicNumber ( StringRef  MagicNumber)
static