9#ifndef LLVM_DEBUGINFO_CODEVIEW_GLOBALTYPETABLEBUILDER_H
10#define LLVM_DEBUGINFO_CODEVIEW_GLOBALTYPETABLEBUILDER_H
53 std::optional<TypeIndex>
getFirst()
override;
71 template <
typename CreateFunc>
74 assert(RecordSize < UINT32_MAX &&
"Record too big");
75 assert(RecordSize % 4 == 0 &&
76 "RecordSize is not a multiple of 4 bytes which will cause "
77 "misalignment in the output TPI stream!");
79 auto Result = HashedRecords.try_emplace(Hash,
nextTypeIndex());
82 Result.first->second.isSimple())) {
86 if (StableRecord.
empty()) {
92 if (Result.first->second.isSimple()) {
93 assert(Result.first->second.getIndex() ==
101 SeenRecords.push_back(StableRecord);
102 SeenHashes.push_back(Hash);
105 return Result.first->second;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the BumpPtrAllocator interface.
#define LLVM_UNLIKELY(EXPR)
static std::string getTypeName(OverloadKind Kind, Type *Ty)
This file defines the DenseMap class.
static bool contains(SmallPtrSetImpl< ConstantExpr * > &Cache, ConstantExpr *Expr, Constant *C)
This file defines the SmallVector class.
static SymbolRef::Type getType(const Symbol *Sym)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
bool empty() const
empty - Check if the array is empty.
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
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.
std::optional< TypeIndex > getNext(TypeIndex Prev) override
BumpPtrAllocator & getAllocator()
uint32_t capacity() override
TypeIndex insertRecordBytes(ArrayRef< uint8_t > Data)
TypeIndex insertRecordAs(GloballyHashedType Hash, size_t RecordSize, CreateFunc Create)
~GlobalTypeTableBuilder()
TypeIndex nextTypeIndex() const
GlobalTypeTableBuilder(BumpPtrAllocator &Storage)
bool replaceType(TypeIndex &Index, CVType Data, bool Stabilize) override
TypeIndex writeLeafType(T &Record)
std::optional< TypeIndex > getFirst() override
CVRecord< TypeLeafKind > CVType
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
A globally hashed type represents a hash value that is sufficient to uniquely identify a record acros...