9#ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
10#define LLVM_DEBUGINFO_CODEVIEW_SYMBOLSERIALIZER_H
34 std::array<uint8_t, MaxRecordLength> RecordBuffer;
38 std::optional<SymbolKind> CurrentSymbol;
42 Prefix.RecordKind = Kind;
44 if (
auto EC = Writer.writeObject(Prefix))
52 template <
typename SymType>
56 CVSymbol Result(&Prefix,
sizeof(Prefix));
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);
This file defines the BumpPtrAllocator interface.
Provides write only access to a subclass of WritableBinaryStream.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
Error visitSymbolBegin(CVSymbol &Record) override
static CVSymbol writeOneSymbol(SymType &Sym, BumpPtrAllocator &Storage, CodeViewContainer Container)
SymbolSerializer(BumpPtrAllocator &Storage, CodeViewContainer Container)
Error visitSymbolEnd(CVSymbol &Record) override
CVRecord< SymbolKind > CVSymbol
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
void consumeError(Error Err)
Consume a Error without doing anything.