24 : Storage(Allocator), Stream(RecordBuffer, support::
little), Writer(Stream),
25 Mapping(Writer, Container) {}
28 assert(!CurrentSymbol.
hasValue() &&
"Already in a symbol mapping!");
32 if (
auto EC = writeRecordPrefix(Record.
kind()))
35 CurrentSymbol = Record.
kind();
49 uint16_t Length = RecordEnd - 2;
54 uint8_t *StableStorage = Storage.
Allocate<uint8_t>(RecordEnd);
55 ::memcpy(StableStorage, &RecordBuffer[0], RecordEnd);
57 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
LLVM_ATTRIBUTE_RETURNS_NONNULL LLVM_ATTRIBUTE_RETURNS_NOALIAS void * Allocate(size_t Size, size_t Alignment)
Allocate space at the specified alignment.
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)
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