10 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H 11 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H 34 std::array<uint8_t, MaxRecordLength> RecordBuffer;
52 template <
typename SymType>
67 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \ 68 Error visitKnownRecord(CVSymbol &CVR, Name &Record) override { \ 69 return visitKnownRecordImpl(CVR, Record); \ 71 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 72 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def" 75 template <
typename RecordKind>
76 Error visitKnownRecordImpl(
CVSymbol &CVR, RecordKind &Record) {
77 return Mapping.visitKnownRecord(CVR, Record);
84 #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 class represents lattice values for constants.
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.