23 : Storage(Allocator), Stream(RecordBuffer, support::
little), Writer(Stream),
24 Mapping(Writer, Container) {}
27 assert(!CurrentSymbol.
hasValue() &&
"Already in a symbol mapping!");
31 if (
auto EC = writeRecordPrefix(Record.
kind()))
34 CurrentSymbol = Record.
kind();
53 uint8_t *StableStorage = Storage.
Allocate<uint8_t>(RecordEnd);
54 ::memcpy(StableStorage, &RecordBuffer[0], RecordEnd);
56 CurrentSymbol.
reset();
This class represents lattice values for constants.
Error visitSymbolEnd(CVSymbol &Record) override
Allocate memory in an ever growing pool, as if by bump-pointer.
uint32_t getOffset() const
Error writeInteger(T Value)
Write the integer Value to the underlying stream in the specified endianness.
Error visitSymbolEnd(CVSymbol &Record) override
static ErrorSuccess success()
Create a success value.
SymbolSerializer(BumpPtrAllocator &Storage, CodeViewContainer Container)
LLVM_ATTRIBUTE_RETURNS_NONNULL LLVM_ATTRIBUTE_RETURNS_NOALIAS void * Allocate(size_t Size, Align Alignment)
Allocate space at the specified alignment.
void setOffset(uint32_t Off)
ArrayRef< uint8_t > RecordData
Error visitSymbolBegin(CVSymbol &Record) override
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
Error visitSymbolBegin(CVSymbol &Record) override
CVRecord is a fat pointer (base + size pair) to a symbol or type record.