10 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
11 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
46 : Writer(Writer), Mapping(Writer) {}
49 assert(!CurrentSymbol.
hasValue() &&
"Already in a symbol mapping!");
52 if (
auto EC = writeRecordPrefix(Record.
kind()))
55 CurrentSymbol = Record.
kind();
70 uint16_t Length = RecordEnd - Writer.
getOffset() - 2;
75 CurrentSymbol.
reset();
80 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
81 virtual Error visitKnownRecord(CVSymbol &CVR, Name &Record) override { \
82 return visitKnownRecordImpl(CVR, Record); \
84 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
85 #include "CVSymbolTypes.def"
88 template <
typename RecordKind>
89 Error visitKnownRecordImpl(
CVSymbol &CVR, RecordKind &Record) {
90 return Mapping.visitKnownRecord(CVR, Record);
void setOffset(uint32_t Off)
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
virtual Error visitSymbolBegin(CVSymbol &Record) override
Paired begin/end actions for all symbols.
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
SymbolSerializer(msf::StreamWriter &Writer)
virtual Error visitSymbolEnd(CVSymbol &Record) override
Error writeObject(const T &Obj)
CVRecord< SymbolKind > CVSymbol
Error writeInteger(uint8_t Int)
Error visitSymbolEnd(CVSymbol &Record) override
static ErrorSuccess success()
Create a success value.
uint32_t getOffset() const
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
Error visitSymbolBegin(CVSymbol &Record) override
Paired begin/end actions for all symbols.