LLVM: lib/DebugInfo/CodeView/TypeTableCollection.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
10
14
15using namespace llvm;
17
19 : NameStorage(Allocator), Records(Records) {
20 Names.resize(Records.size());
21}
22
25 return std::nullopt;
27}
28
31 ++Prev;
33 return std::nullopt;
34 return Prev;
35}
36
38 assert(Index.toArrayIndex() < Records.size());
39 return CVType(Records[Index.toArrayIndex()]);
40}
41
43 if (Index.isNoneType() || Index.isSimple())
45
46 uint32_t I = Index.toArrayIndex();
47 if (Names[I].data() == nullptr) {
49 Names[I] = Result;
50 }
51 return Names[I];
52}
53
55 return Index.toArrayIndex() <= size();
56}
57
59
61
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
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.
static TypeIndex fromArrayIndex(uint32_t Index)
uint32_t toArrayIndex() const
static LLVM_ABI StringRef simpleTypeName(TypeIndex TI)
CVType getType(TypeIndex Index) override
Definition TypeTableCollection.cpp:37
bool contains(TypeIndex Index) override
Definition TypeTableCollection.cpp:54
TypeTableCollection(ArrayRef< ArrayRef< uint8_t > > Records)
Definition TypeTableCollection.cpp:18
std::optional< TypeIndex > getFirst() override
Definition TypeTableCollection.cpp:23
uint32_t size() override
Definition TypeTableCollection.cpp:58
std::optional< TypeIndex > getNext(TypeIndex Prev) override
Definition TypeTableCollection.cpp:29
uint32_t capacity() override
Definition TypeTableCollection.cpp:60
StringRef getTypeName(TypeIndex Index) override
Definition TypeTableCollection.cpp:42
bool replaceType(TypeIndex &Index, CVType Data, bool Stabilize) override
Definition TypeTableCollection.cpp:62
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
CVRecord< TypeLeafKind > CVType
LLVM_ABI std::string computeTypeName(TypeCollection &Types, TypeIndex Index)
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data