LLVM: lib/DebugInfo/CodeView/AppendingTypeTableBuilder.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
15#include
16#include
17#include
18
19using namespace llvm;
21
25
27 : RecordStorage(Storage) {}
28
30
33 return std::nullopt;
34
36}
37
40 return std::nullopt;
41 return Prev;
42}
43
45 return CVType(SeenRecords[Index.toArrayIndex()]);
46}
47
51
53 if (Index.isSimple() || Index.isNoneType())
54 return false;
55
56 return Index.toArrayIndex() < SeenRecords.size();
57}
58
60
62
64 return SeenRecords;
65}
66
68
75
80 SeenRecords.push_back(Record);
81 return NewTI;
82}
83
88 assert(!Fragments.empty());
89 for (auto C : Fragments)
91 return TI;
92}
93
95 bool Stabilize) {
96 assert(Index.toArrayIndex() < SeenRecords.size() &&
97 "This function cannot be used to insert records!");
98
100 if (Stabilize)
102 SeenRecords[Index.toArrayIndex()] = Record;
103 return true;
104}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the BumpPtrAllocator interface.
static ArrayRef< uint8_t > stabilize(BumpPtrAllocator &RecordStorage, ArrayRef< uint8_t > Record)
Definition AppendingTypeTableBuilder.cpp:69
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef - Represent a constant reference to a string, i.e.
TypeIndex insertRecord(ContinuationRecordBuilder &Builder)
Definition AppendingTypeTableBuilder.cpp:85
uint32_t capacity() override
Definition AppendingTypeTableBuilder.cpp:61
void reset()
Definition AppendingTypeTableBuilder.cpp:67
std::optional< TypeIndex > getFirst() override
Definition AppendingTypeTableBuilder.cpp:31
TypeIndex nextTypeIndex() const
Definition AppendingTypeTableBuilder.cpp:22
CVType getType(TypeIndex Index) override
Definition AppendingTypeTableBuilder.cpp:44
std::optional< TypeIndex > getNext(TypeIndex Prev) override
Definition AppendingTypeTableBuilder.cpp:38
TypeIndex insertRecordBytes(ArrayRef< uint8_t > &Record)
Definition AppendingTypeTableBuilder.cpp:77
bool replaceType(TypeIndex &Index, CVType Data, bool Stabilize) override
Definition AppendingTypeTableBuilder.cpp:94
bool contains(TypeIndex Index) override
Definition AppendingTypeTableBuilder.cpp:52
StringRef getTypeName(TypeIndex Index) override
Definition AppendingTypeTableBuilder.cpp:48
ArrayRef< ArrayRef< uint8_t > > records() const
Definition AppendingTypeTableBuilder.cpp:63
~AppendingTypeTableBuilder() override
AppendingTypeTableBuilder(BumpPtrAllocator &Storage)
Definition AppendingTypeTableBuilder.cpp:26
uint32_t size() override
Definition AppendingTypeTableBuilder.cpp:59
static TypeIndex fromArrayIndex(uint32_t Index)
static const uint32_t FirstNonSimpleIndex
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
CVRecord< TypeLeafKind > CVType
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.