LLVM 20.0.0git
|
#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< bool > | isBlock (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) |
|
static |
Definition at line 290 of file BitstreamRemarkParser.cpp.
References llvm::createStringError(), llvm::remarks::BitstreamParserHelper::isMetaBlock(), llvm::remarks::BitstreamParserHelper::parseBlockInfoBlock(), llvm::remarks::BitstreamParserHelper::parseMagic(), llvm::Error::success(), llvm::Expected< T >::takeError(), and validateMagicNumber().
Referenced by llvm::remarks::BitstreamRemarkParser::parseMeta().
|
static |
Definition at line 250 of file BitstreamRemarkParser.cpp.
References llvm::BitstreamCursor::advance(), llvm::createStringError(), llvm::BitstreamEntry::Error, llvm::BitstreamCursor::GetCurrentBitNo(), llvm::BitstreamCursor::JumpToBit(), llvm::BitstreamEntry::SubBlock, and llvm::Expected< T >::takeError().
Referenced by llvm::remarks::BitstreamParserHelper::isMetaBlock(), and llvm::remarks::BitstreamParserHelper::isRemarkBlock().
Definition at line 31 of file BitstreamRemarkParser.cpp.
References llvm::createStringError().
Referenced by parseRecord().
|
static |
Definition at line 159 of file BitstreamRemarkParser.cpp.
References llvm::BitstreamCursor::advance(), llvm::BitstreamCursor::AtEndOfStream(), llvm::createStringError(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), llvm::BitstreamEntry::Error, parseRecord(), llvm::BitstreamEntry::Record, llvm::BitstreamEntry::SubBlock, llvm::Error::success(), and llvm::Expected< T >::takeError().
Referenced by llvm::remarks::BitstreamMetaParserHelper::parse(), and llvm::remarks::BitstreamRemarkParserHelper::parse().
|
static |
Parse a record and fill in the fields in the parser.
Definition at line 43 of file BitstreamRemarkParser.cpp.
References llvm::remarks::BitstreamMetaParserHelper::ContainerType, llvm::remarks::BitstreamMetaParserHelper::ContainerVersion, llvm::remarks::BitstreamMetaParserHelper::ExternalFilePath, malformedRecord(), llvm::BitstreamCursor::readRecord(), llvm::remarks::RECORD_META_CONTAINER_INFO, llvm::remarks::RECORD_META_EXTERNAL_FILE, llvm::remarks::RECORD_META_REMARK_VERSION, llvm::remarks::RECORD_META_STRTAB, llvm::remarks::BitstreamMetaParserHelper::RemarkVersion, llvm::remarks::BitstreamMetaParserHelper::Stream, llvm::remarks::BitstreamMetaParserHelper::StrTabBuf, llvm::Error::success(), llvm::Expected< T >::takeError(), and unknownRecord().
Referenced by parseBlock().
|
static |
Parse a record and fill in the fields in the parser.
Definition at line 90 of file BitstreamRemarkParser.cpp.
References llvm::remarks::BitstreamRemarkParserHelper::Args, llvm::remarks::BitstreamRemarkParserHelper::FunctionNameIdx, llvm::remarks::BitstreamRemarkParserHelper::Hotness, malformedRecord(), llvm::remarks::BitstreamRemarkParserHelper::PassNameIdx, llvm::BitstreamCursor::readRecord(), llvm::remarks::RECORD_REMARK_ARG_WITH_DEBUGLOC, llvm::remarks::RECORD_REMARK_ARG_WITHOUT_DEBUGLOC, llvm::remarks::RECORD_REMARK_DEBUG_LOC, llvm::remarks::RECORD_REMARK_HEADER, llvm::remarks::RECORD_REMARK_HOTNESS, llvm::remarks::BitstreamRemarkParserHelper::RemarkNameIdx, llvm::remarks::BitstreamRemarkParserHelper::SourceColumn, llvm::remarks::BitstreamRemarkParserHelper::SourceFileNameIdx, llvm::remarks::BitstreamRemarkParserHelper::SourceLine, llvm::remarks::BitstreamRemarkParserHelper::Stream, llvm::Error::success(), llvm::Expected< T >::takeError(), llvm::remarks::BitstreamRemarkParserHelper::TmpArgs, llvm::remarks::BitstreamRemarkParserHelper::Type, and unknownRecord().
|
static |
Definition at line 405 of file BitstreamRemarkParser.cpp.
References llvm::createStringError(), P, and llvm::Error::success().
|
static |
Definition at line 394 of file BitstreamRemarkParser.cpp.
References llvm::createStringError(), P, and llvm::Error::success().
Definition at line 24 of file BitstreamRemarkParser.cpp.
References llvm::createStringError().
Referenced by parseRecord().
Definition at line 282 of file BitstreamRemarkParser.cpp.
References llvm::remarks::ContainerMagic(), llvm::createStringError(), llvm::StringRef::data(), and llvm::Error::success().
Referenced by advanceToMetaBlock(), and llvm::remarks::createBitstreamParserFromMeta().