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;
41 Prefix.RecordKind = Kind;
51 template <
typename SymType>
55 CVSymbol Result(&Prefix,
sizeof(Prefix));
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);
This file defines the BumpPtrAllocator interface.
Provides write only access to a subclass of WritableBinaryStream.
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
Allocate memory in an ever growing pool, as if by bump-pointer.
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.
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
Error visitSymbolBegin(CVSymbol &Record) override
static CVSymbol writeOneSymbol(SymType &Sym, BumpPtrAllocator &Storage, CodeViewContainer Container)
Error visitSymbolEnd(CVSymbol &Record) override
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
CVRecord< SymbolKind > CVSymbol
This is an optimization pass for GlobalISel generic memory operations.
void consumeError(Error Err)
Consume a Error without doing anything.