28 if (
auto EC = Callbacks.visitKnownRecord(Record, KnownRecord))
38 if (
auto EC = Callbacks.visitKnownMember(Record, KnownRecord))
48 switch (Record.
Kind) {
53 #define MEMBER_RECORD(EnumName, EnumVal, Name) \ 55 if (auto EC = visitKnownMember<Name##Record>(Record, Callbacks)) \ 59 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \ 60 MEMBER_RECORD(EnumVal, EnumVal, AliasName) 61 #define TYPE_RECORD(EnumName, EnumVal, Name) 62 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 63 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" 97 : Callbacks(Callbacks) {}
100 switch (Record.
Type) {
105 #define TYPE_RECORD(EnumName, EnumVal, Name) \ 107 if (auto EC = visitKnownRecord<Name##Record>(Record, Callbacks)) \ 111 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) \ 112 TYPE_RECORD(EnumVal, EnumVal, AliasName) 113 #define MEMBER_RECORD(EnumName, EnumVal, Name) 114 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 115 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" 144 for (
auto I : Types) {
152 for (
auto I : Types) {
172 while (!Reader.
empty()) {
185 struct FieldListVisitHelper {
189 Deserializer(Reader),
192 Pipeline.addCallbackToPipeline(Deserializer);
193 Pipeline.addCallbackToPipeline(Callbacks);
201 CVTypeVisitor Visitor;
208 Pipeline.addCallbackToPipeline(Deserializer);
209 Pipeline.addCallbackToPipeline(Callbacks);
215 CVTypeVisitor Visitor;
222 VisitHelper V(Callbacks, Source);
223 return V.Visitor.visitTypeRecord(Record, Index);
229 VisitHelper V(Callbacks, Source);
230 return V.Visitor.visitTypeRecord(Record);
236 VisitHelper V(Callbacks, Source);
237 return V.Visitor.visitTypeStream(Types);
243 return V.Visitor.visitTypeStream(Types);
252 return V.Visitor.visitTypeStream(Types);
258 FieldListVisitHelper V(Callbacks, Record.
Data, Source);
259 return V.Visitor.visitMemberRecord(Record);
274 return V.Visitor.visitFieldListMemberStream(V.Reader);
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer...
virtual Optional< TypeIndex > getNext(TypeIndex Prev)=0
This class represents lattice values for constants.
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
virtual CVType getType(TypeIndex Index)=0
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
virtual Optional< TypeIndex > getFirst()=0
virtual Error visitUnknownMember(CVMemberRecord &Record)
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 or .debug$P section or PDB type stream.
The instances of the Type class are immutable: once they are created, they are never changed...
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
static Error visitMemberRecord(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
Error visitTypeRecord(CVType &Record, TypeIndex Index, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
Error visitTypeStream(const CVTypeArray &Types, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
static ErrorSuccess success()
Create a success value.
virtual Error visitMemberBegin(CVMemberRecord &Record)
Error visitMemberRecord(CVMemberRecord Record, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
virtual Error visitTypeBegin(CVType &Record)
Paired begin/end actions for all types.
A range adaptor for a pair of iterators.
static Error finishVisitation(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
static Error visitKnownRecord(CVType &Record, TypeVisitorCallbacks &Callbacks)
Lightweight error class with error context and mandatory checking.
Provides read only access to a subclass of BinaryStream.
Error readEnum(T &Dest)
Similar to readInteger.
virtual Error visitMemberEnd(CVMemberRecord &Record)