27 OS <<
format(
"\n CU list offset = 0x%x, has %" PRId64
" entries:",
31 for (
const CompUnitEntry &
CU : CuList)
32 OS <<
format(
" %d: Offset = 0x%llx, Length = 0x%llx\n",
I++,
CU.Offset,
37 OS <<
formatv(
"\n Types CU list offset = {0:x}, has {1} entries:\n",
38 TuListOffset, TuList.
size());
40 for (
const TypeUnitEntry &TU : TuList)
41 OS <<
formatv(
" {0}: offset = {1:x8}, type_offset = {2:x8}, "
42 "type_signature = {3:x16}\n",
43 I++, TU.Offset, TU.TypeOffset, TU.TypeSignature);
47 OS <<
format(
"\n Address area offset = 0x%x, has %" PRId64
" entries:",
50 for (
const AddressEntry &
Addr : AddressArea)
52 " Low/High address = [0x%llx, 0x%llx) (Size: 0x%llx), CU id = %d\n",
58 OS <<
format(
"\n Symbol table offset = 0x%x, size = %" PRId64
63 for (
const SymTableEntry &
E : SymbolTable) {
65 if (!
E.NameOffset && !
E.VecOffset)
68 OS <<
format(
" %d: Name offset = 0x%x, CU vector offset = 0x%x\n",
I,
69 E.NameOffset,
E.VecOffset);
72 ConstantPoolOffset - StringPoolOffset +
E.NameOffset);
77 return V.first ==
E.VecOffset;
79 assert(CuVector != ConstantPoolVectors.end() &&
"Invalid symbol table");
80 uint32_t CuVectorId = CuVector - ConstantPoolVectors.begin();
81 OS <<
format(
" String name: %s, CU vector index: %d\n",
Name.data(),
87 OS <<
format(
"\n Constant pool offset = 0x%x, has %" PRId64
" CU vectors:",
88 ConstantPoolOffset, (
uint64_t)ConstantPoolVectors.size());
90 for (
const auto &V : ConstantPoolVectors) {
100 OS <<
"\n<error parsing>\n";
105 OS <<
" Version = " << Version <<
'\n';
110 dumpConstantPool(
OS);
128 if (
Offset != CuListOffset)
131 uint32_t CuListSize = (TuListOffset - CuListOffset) / 16;
133 for (
uint32_t i = 0; i < CuListSize; ++i) {
141 uint32_t TuListSize = (AddressAreaOffset - TuListOffset) / 24;
142 TuList.
resize(TuListSize);
147 TuList[
I] = {CuOffset, TypeOffset, Signature};
150 uint32_t AddressAreaSize = (SymbolTableOffset - AddressAreaOffset) / 20;
151 AddressArea.
reserve(AddressAreaSize);
152 for (
uint32_t i = 0; i < AddressAreaSize; ++i) {
156 AddressArea.
push_back({LowAddress, HighAddress, CuIndex});
167 uint32_t SymTableSize = (ConstantPoolOffset - SymbolTableOffset) / 8;
168 SymbolTable.reserve(SymTableSize);
170 for (
uint32_t i = 0; i < SymTableSize; ++i) {
173 SymbolTable.push_back({NameOffset, CuVecOffset});
174 if (NameOffset || CuVecOffset)
181 for (
uint32_t i = 0; i < CuVectorsTotal; ++i) {
183 auto &Vec = ConstantPoolVectors.back();
184 Vec.first =
Offset - ConstantPoolOffset;
191 ConstantPoolStrings =
Data.getData().drop_front(
Offset);
192 StringPoolOffset =
Offset;
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
void dump(raw_ostream &OS)
void parse(DataExtractor Data)
void reserve(size_type N)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
auto formatv(const char *Fmt, Ts &&... Vals) -> formatv_object< decltype(std::make_tuple(detail::build_format_adapter(std::forward< Ts >(Vals))...))>
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.