9#ifndef LLVM_DEBUGINFO_CODEVIEW_GLOBALTYPETABLEBUILDER_H
10#define LLVM_DEBUGINFO_CODEVIEW_GLOBALTYPETABLEBUILDER_H
27class ContinuationRecordBuilder;
52 std::optional<TypeIndex>
getFirst()
override;
70 template <
typename CreateFunc>
73 assert(RecordSize < UINT32_MAX &&
"Record too big");
74 assert(RecordSize % 4 == 0 &&
75 "RecordSize is not a multiple of 4 bytes which will cause "
76 "misalignment in the output TPI stream!");
81 Result.first->second.isSimple())) {
82 uint8_t *Stable = RecordStorage.
Allocate<uint8_t>(RecordSize);
85 if (StableRecord.
empty()) {
91 if (Result.first->second.isSimple()) {
92 assert(Result.first->second.getIndex() ==
104 return Result.first->second;
This file defines the BumpPtrAllocator interface.
#define LLVM_UNLIKELY(EXPR)
This file defines the DenseMap class.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
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.
Allocate memory in an ever growing pool, as if by bump-pointer.
LLVM_ATTRIBUTE_RETURNS_NONNULL void * Allocate(size_t Size, Align Alignment)
Allocate space at the specified alignment.
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&... Args)
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
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.
std::optional< TypeIndex > getNext(TypeIndex Prev) override
BumpPtrAllocator & getAllocator()
ArrayRef< ArrayRef< uint8_t > > records() const
uint32_t capacity() override
bool contains(TypeIndex Index) override
TypeIndex insertRecord(ContinuationRecordBuilder &Builder)
CVType getType(TypeIndex Index) override
TypeIndex insertRecordBytes(ArrayRef< uint8_t > Data)
TypeIndex insertRecordAs(GloballyHashedType Hash, size_t RecordSize, CreateFunc Create)
~GlobalTypeTableBuilder()
TypeIndex nextTypeIndex() const
bool replaceType(TypeIndex &Index, CVType Data, bool Stabilize) override
ArrayRef< GloballyHashedType > hashes() const
TypeIndex writeLeafType(T &Record)
std::optional< TypeIndex > getFirst() override
ArrayRef< uint8_t > serialize(T &Record)
This is an optimization pass for GlobalISel generic memory operations.
StringRef getTypeName()
We provide a function which tries to compute the (demangled) name of a type statically.
A globally hashed type represents a hash value that is sufficient to uniquely identify a record acros...