Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLDESERIALIZER_H
10 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLDESERIALIZER_H
23 class SymbolVisitorDelegate;
28 Mapping(Reader, Container) {}
57 : Delegate(Delegate), Container(Container) {}
64 assert(!Mapping &&
"Already in a symbol mapping!");
65 Mapping = std::make_unique<MappingInfo>(
Record.content(), Container);
66 return Mapping->Mapping.visitSymbolBegin(
Record);
69 assert(Mapping &&
"Not in a symbol mapping!");
70 auto EC = Mapping->Mapping.visitSymbolEnd(
Record);
75 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
76 Error visitKnownRecord(CVSymbol &CVR, Name &Record) override { \
77 return visitKnownRecordImpl(CVR, Record); \
79 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
80 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
83 template <
typename T> Error visitKnownRecordImpl(
CVSymbol &CVR, T &Record) {
87 if (
auto EC = Mapping->Mapping.visitKnownRecord(CVR, Record))
92 SymbolVisitorDelegate *Delegate;
94 std::unique_ptr<MappingInfo> Mapping;
This is an optimization pass for GlobalISel generic memory operations.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
CVRecord< SymbolKind > CVSymbol
Provides read only access to a subclass of BinaryStream.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Error visitSymbolBegin(CVSymbol &Record, uint32_t Offset) override
Paired begin/end actions for all symbols.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static Error deserializeAs(CVSymbol Symbol, T &Record)
CVRecord is a fat pointer (base + size pair) to a symbol or type record.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
static Expected< T > deserializeAs(CVSymbol Symbol)
Lightweight error class with error context and mandatory checking.
virtual uint32_t getRecordOffset(BinaryStreamReader Reader)=0
SymbolRecordKind
Distinguishes individual records in the Symbols subsection of a .debug$S section.
Error visitSymbolBegin(CVSymbol &Record) override
Error visitSymbolEnd(CVSymbol &Record) override
SymbolDeserializer(SymbolVisitorDelegate *Delegate, CodeViewContainer Container)