17 using namespace llvm::codeview;
21 if (Data.
size() <
sizeof(*Res))
23 Res =
reinterpret_cast<const T *
>(Data.
data());
29 : Callbacks(Callbacks) {}
36 if (
auto EC = Callbacks.visitKnownRecord(Record, KnownRecord))
45 switch (Record.
Type) {
50 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
52 if (auto EC = visitKnownRecord<Name>(Record, Callbacks)) \
56 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \
57 SYMBOL_RECORD(EnumVal, EnumVal, AliasName)
58 #include "llvm/DebugInfo/CodeView/CVSymbolTypes.def"
68 for (
auto I : Symbols) {
SymbolRecordKind
Distinguishes individual records in the Symbols subsection of a .debug$S section. ...
virtual Error visitUnknownSymbol(CVSymbol &Record)
Action to take on unknown symbols. By default, they are ignored.
Error visitSymbolRecord(CVSymbol &Record)
CVSymbolVisitor(SymbolVisitorCallbacks &Callbacks)
virtual Error visitSymbolEnd(CVSymbol &Record)
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
size_t size() const
size - Get the array size.
static ErrorSuccess success()
Create a success value.
static Error takeObject(ArrayRef< uint8_t > &Data, const T *&Res)
Error visitSymbolStream(const CVSymbolArray &Symbols)
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
Lightweight error class with error context and mandatory checking.
virtual Error visitSymbolBegin(CVSymbol &Record)
Paired begin/end actions for all symbols.