18 using namespace llvm::codeview;
21 : Callbacks(Callbacks) {}
27 if (
auto EC = Callbacks.visitKnownRecord(Record, KnownRecord))
37 if (
auto EC = Callbacks.visitKnownMember(Record, KnownRecord))
46 switch (Record.
Type) {
51 #define TYPE_RECORD(EnumName, EnumVal, Name) \
53 if (auto EC = visitKnownRecord<Name##Record>(Record, Callbacks)) \
57 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \
58 TYPE_RECORD(EnumVal, EnumVal, AliasName)
59 #define MEMBER_RECORD(EnumName, EnumVal, Name)
60 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
61 #include "llvm/DebugInfo/CodeView/TypeRecords.def"
75 switch (Record.
Kind) {
80 #define MEMBER_RECORD(EnumName, EnumVal, Name) \
82 if (auto EC = visitKnownMember<Name##Record>(Record, Callbacks)) \
86 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \
87 MEMBER_RECORD(EnumVal, EnumVal, AliasName)
88 #define TYPE_RECORD(EnumName, EnumVal, Name)
89 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
90 #include "llvm/DebugInfo/CodeView/TypeRecords.def"
105 for (
auto I : Types) {
119 while (!Reader.
empty()) {
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
CVTypeVisitor(TypeVisitorCallbacks &Callbacks)
virtual Error visitUnknownMember(CVMemberRecord &Record)
Error visitTypeStream(const CVTypeArray &Types)
Visits the type records in Data. Sets the error flag on parse failures.
virtual Error visitUnknownType(CVType &Record)
Action to take on unknown types. By default, they are ignored.
virtual Error visitTypeEnd(CVType &Record)
TypeRecordKind
Distinguishes individual records in .debug$T section or PDB type stream.
Error visitTypeRecord(CVType &Record)
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
static Error visitMemberRecord(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
static ErrorSuccess success()
Create a success value.
Error visitFieldListMemberStream(ArrayRef< uint8_t > FieldList)
virtual Error visitMemberBegin(CVMemberRecord &Record)
virtual Error visitTypeBegin(CVType &Record)
Paired begin/end actions for all types.
static Error visitKnownRecord(CVType &Record, TypeVisitorCallbacks &Callbacks)
Lightweight error class with error context and mandatory checking.
void addCallbackToPipeline(TypeVisitorCallbacks &Callbacks)
virtual Error visitMemberEnd(CVMemberRecord &Record)
Error visitMemberRecord(CVMemberRecord &Record)