#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>
usingnamespacellvm;
usingnamespacellvm::remarks;
static Error unknownRecord(const char *BlockName, unsigned RecordID) { … }
static Error malformedRecord(const char *BlockName, const char *RecordName) { … }
BitstreamMetaParserHelper::BitstreamMetaParserHelper(
BitstreamCursor &Stream, BitstreamBlockInfo &BlockInfo)
: … { … }
static Error parseRecord(BitstreamMetaParserHelper &Parser, unsigned Code) { … }
BitstreamRemarkParserHelper::BitstreamRemarkParserHelper(
BitstreamCursor &Stream)
: … { … }
static Error parseRecord(BitstreamRemarkParserHelper &Parser, unsigned Code) { … }
template <typename T>
static Error parseBlock(T &ParserHelper, unsigned BlockID,
const char *BlockName) { … }
Error BitstreamMetaParserHelper::parse() { … }
Error BitstreamRemarkParserHelper::parse() { … }
BitstreamParserHelper::BitstreamParserHelper(StringRef Buffer)
: … { … }
Expected<std::array<char, 4>> BitstreamParserHelper::parseMagic() { … }
Error BitstreamParserHelper::parseBlockInfoBlock() { … }
static Expected<bool> isBlock(BitstreamCursor &Stream, unsigned BlockID) { … }
Expected<bool> BitstreamParserHelper::isMetaBlock() { … }
Expected<bool> BitstreamParserHelper::isRemarkBlock() { … }
static Error validateMagicNumber(StringRef MagicNumber) { … }
static Error advanceToMetaBlock(BitstreamParserHelper &Helper) { … }
Expected<std::unique_ptr<BitstreamRemarkParser>>
remarks::createBitstreamParserFromMeta(
StringRef Buf, std::optional<ParsedStringTable> StrTab,
std::optional<StringRef> ExternalFilePrependPath) { … }
Expected<std::unique_ptr<Remark>> BitstreamRemarkParser::next() { … }
Error BitstreamRemarkParser::parseMeta() { … }
Error BitstreamRemarkParser::processCommonMeta(
BitstreamMetaParserHelper &Helper) { … }
static Error processStrTab(BitstreamRemarkParser &P,
std::optional<StringRef> StrTabBuf) { … }
static Error processRemarkVersion(BitstreamRemarkParser &P,
std::optional<uint64_t> RemarkVersion) { … }
Error BitstreamRemarkParser::processExternalFilePath(
std::optional<StringRef> ExternalFilePath) { … }
Error BitstreamRemarkParser::processStandaloneMeta(
BitstreamMetaParserHelper &Helper) { … }
Error BitstreamRemarkParser::processSeparateRemarksFileMeta(
BitstreamMetaParserHelper &Helper) { … }
Error BitstreamRemarkParser::processSeparateRemarksMetaMeta(
BitstreamMetaParserHelper &Helper) { … }
Expected<std::unique_ptr<Remark>> BitstreamRemarkParser::parseRemark() { … }
Expected<std::unique_ptr<Remark>>
BitstreamRemarkParser::processRemark(BitstreamRemarkParserHelper &Helper) { … }