20 using namespace llvm::codeview;
25 Stream(RecordBuffer, support::
little), Writer(Stream),
26 Mapping(Writer, Container) {}
29 assert(!CurrentSymbol.
hasValue() &&
"Already in a symbol mapping!");
33 if (
auto EC = writeRecordPrefix(Record.
kind()))
36 CurrentSymbol = Record.
kind();
50 uint16_t Length = RecordEnd - 2;
55 uint8_t *StableStorage = Storage.
Allocate<uint8_t>(RecordEnd);
56 ::memcpy(StableStorage, &RecordBuffer[0], RecordEnd);
58 CurrentSymbol.
reset();
uint32_t getOffset() const
Error visitSymbolEnd(CVSymbol &Record) override
Allocate memory in an ever growing pool, as if by bump-pointer.
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 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