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 <<
" UUIDSize = " <<
HEX8(
H.UUIDSize) <<
'\n';
29 OS <<
" BaseAddress = " <<
HEX64(
H.BaseAddress) <<
'\n';
30 OS <<
" NumAddresses = " <<
HEX32(
H.NumAddresses) <<
'\n';
31 OS <<
" StrtabOffset = " <<
HEX32(
H.StrtabOffset) <<
'\n';
32 OS <<
" StrtabSize = " <<
HEX32(
H.StrtabSize) <<
'\n';
34 for (uint8_t
I = 0;
I <
H.UUIDSize; ++
I)
44 "invalid GSYM magic 0x%8.8x",
Magic);
47 "unsupported GSYM version %u",
Version);
55 "invalid address offset size %u",
69 "not enough data for a gsym::Header");
81 return std::move(Err);
102 return LHS.Magic ==
RHS.Magic &&
LHS.Version ==
RHS.Version &&
103 LHS.AddrOffSize ==
RHS.AddrOffSize &&
LHS.UUIDSize ==
RHS.UUIDSize &&
104 LHS.BaseAddress ==
RHS.BaseAddress &&
105 LHS.NumAddresses ==
RHS.NumAddresses &&
106 LHS.StrtabOffset ==
RHS.StrtabOffset &&
107 LHS.StrtabSize ==
RHS.StrtabSize &&
Merge contiguous icmps into a memcmp
std::pair< llvm::MachO::Target, std::string > UUID
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
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.
raw_ostream & operator<<(raw_ostream &OS, const FunctionInfo &R)
constexpr size_t GSYM_MAX_UUID_SIZE
bool operator==(const FunctionInfo &LHS, const FunctionInfo &RHS)
constexpr uint32_t GSYM_MAGIC
constexpr uint32_t GSYM_VERSION
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.
FormattedNumber format_hex_no_prefix(uint64_t N, unsigned Width, bool Upper=false)
format_hex_no_prefix - Output N as a fixed width hexadecimal.