10 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
11 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
31 std::vector<uint8_t> RecordBuffer;
49 template <
typename SymType>
64 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
65 Error visitKnownRecord(CVSymbol &CVR, Name &Record) override { \
66 return visitKnownRecordImpl(CVR, Record); \
68 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
69 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
72 template <
typename RecordKind>
73 Error visitKnownRecordImpl(
CVSymbol &CVR, RecordKind &Record) {
74 return Mapping.visitKnownRecord(CVR, Record);
81 #endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer...
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
CVRecord< SymbolKind > CVSymbol
Error visitSymbolEnd(CVSymbol &Record) override
Allocate memory in an ever growing pool, as if by bump-pointer.
Provides write only access to a subclass of WritableBinaryStream.
void consumeError(Error Err)
Consume a Error without doing anything.
static CVSymbol writeOneSymbol(SymType &Sym, BumpPtrAllocator &Storage, CodeViewContainer Container)
static ErrorSuccess success()
Create a success value.
SymbolSerializer(BumpPtrAllocator &Storage, CodeViewContainer Container)
Error visitSymbolBegin(CVSymbol &Record) override
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
Lightweight error class with error context and mandatory checking.