#include "llvm/Bitcode/BitcodeAnalyzer.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/Bitstream/BitCodes.h"
#include "llvm/Bitstream/BitstreamReader.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/SHA1.h"
#include <optional>
usingnamespacellvm;
static Error reportError(StringRef Message) { … }
static std::optional<const char *>
GetBlockName(unsigned BlockID, const BitstreamBlockInfo &BlockInfo,
CurStreamTypeType CurStreamType) { … }
static std::optional<const char *>
GetCodeName(unsigned CodeID, unsigned BlockID,
const BitstreamBlockInfo &BlockInfo,
CurStreamTypeType CurStreamType) { … }
static void printSize(raw_ostream &OS, double Bits) { … }
static void printSize(raw_ostream &OS, uint64_t Bits) { … }
static Expected<CurStreamTypeType> ReadSignature(BitstreamCursor &Stream) { … }
static Expected<CurStreamTypeType> analyzeHeader(std::optional<BCDumpOptions> O,
BitstreamCursor &Stream) { … }
static bool canDecodeBlob(unsigned Code, unsigned BlockID) { … }
Error BitcodeAnalyzer::decodeMetadataStringsBlob(StringRef Indent,
ArrayRef<uint64_t> Record,
StringRef Blob,
raw_ostream &OS) { … }
BitcodeAnalyzer::BitcodeAnalyzer(StringRef Buffer,
std::optional<StringRef> BlockInfoBuffer)
: … { … }
Error BitcodeAnalyzer::analyze(std::optional<BCDumpOptions> O,
std::optional<StringRef> CheckHash) { … }
void BitcodeAnalyzer::printStats(BCDumpOptions O,
std::optional<StringRef> Filename) { … }
Error BitcodeAnalyzer::parseBlock(unsigned BlockID, unsigned IndentLevel,
std::optional<BCDumpOptions> O,
std::optional<StringRef> CheckHash) { … }