Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
10 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
33 std::array<uint8_t, MaxRecordLength> RecordBuffer;
37 std::optional<SymbolKind> CurrentSymbol;
51 template <
typename SymType>
66 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
67 Error visitKnownRecord(CVSymbol &CVR, Name &Record) override { \
68 return visitKnownRecordImpl(CVR, Record); \
70 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
71 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
74 template <
typename RecordKind>
75 Error visitKnownRecordImpl(
CVSymbol &CVR, RecordKind &Record) {
76 return Mapping.visitKnownRecord(CVR, Record);
83 #endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
This is an optimization pass for GlobalISel generic memory operations.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
Provides write only access to a subclass of WritableBinaryStream.
static ErrorSuccess success()
Create a success value.
Error visitSymbolBegin(CVSymbol &Record) override
void consumeError(Error Err)
Consume a Error without doing anything.
Error visitSymbolEnd(CVSymbol &Record) override
CVRecord< SymbolKind > CVSymbol
static CVSymbol writeOneSymbol(SymType &Sym, BumpPtrAllocator &Storage, CodeViewContainer Container)
SymbolSerializer(BumpPtrAllocator &Storage, CodeViewContainer Container)
Allocate memory in an ever growing pool, as if by bump-pointer.
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Lightweight error class with error context and mandatory checking.