15#define HEX8(v) llvm::format_hex(v, 4)
16#define HEX16(v) llvm::format_hex(v, 6)
17#define HEX32(v) llvm::format_hex(v, 10)
18#define HEX64(v) llvm::format_hex(v, 18)
25 OS <<
" Magic = " <<
HEX32(
H.Magic) <<
"\n";
26 OS <<
" Version = " <<
HEX16(
H.Version) <<
'\n';
27 OS <<
" AddrOffSize = " <<
HEX8(
H.AddrOffSize) <<
'\n';
28 OS <<
" StrTableEnc = " <<
HEX8(
static_cast<uint8_t>(
H.StrTableEncoding))
30 OS <<
" BaseAddress = " <<
HEX64(
H.BaseAddress) <<
'\n';
31 OS <<
" NumAddresses = " <<
HEX32(
H.NumAddresses) <<
'\n';
38 "invalid GSYM magic 0x%8.8x",
Magic);
41 "unsupported GSYM version %u",
Version);
51 "unsupported string table encoding %u", Encoding);
62 if (!
Data.isValidOffsetForDataOfSize(
Offset, FixedHeaderSize))
64 "not enough data for a gsym::HeaderV2");
73 return std::move(Err);
90 return LHS.Magic == RHS.Magic && LHS.Version == RHS.Version &&
91 LHS.AddrOffSize == RHS.AddrOffSize &&
92 LHS.StrTableEncoding == RHS.StrTableEncoding &&
93 LHS.BaseAddress == RHS.BaseAddress &&
94 LHS.NumAddresses == RHS.NumAddresses;
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
A simplified binary data writer class that doesn't require targets, target definitions,...
This class implements an extremely fast bulk output stream that can only output to a stream.
LLVM_ABI raw_ostream & operator<<(raw_ostream &OS, const CallSiteInfo &CSI)
bool operator==(const FunctionInfo &LHS, const FunctionInfo &RHS)
constexpr uint32_t GSYM_MAGIC
StringTableEncoding
Encoding format for the string table.
@ Default
A list of NULL-terminated strings (same as V1).
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
FunctionAddr VTableAddr uintptr_t uintptr_t Data