28 if (
auto EC = Callbacks.visitKnownRecord(
Record, KnownRecord))
38 if (
auto EC = Callbacks.visitKnownMember(
Record, KnownRecord))
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) {}
102 if (
auto EC = Callbacks.visitUnknownType(
Record))
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"
118 if (
auto EC = Callbacks.visitTypeEnd(
Record))
125 if (
auto EC = Callbacks.visitTypeBegin(
Record, Index))
132 if (
auto EC = Callbacks.visitTypeBegin(
Record))
139 return ::visitMemberRecord(
Record, Callbacks);
144 for (
auto I : Types) {
152 for (
auto I : Types) {
160 std::optional<TypeIndex>
I =
Types.getFirst();
172 while (!Reader.
empty()) {
185struct 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);
static Error finishVisitation(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
static Error visitKnownRecord(CVType &Record, TypeVisitorCallbacks &Callbacks)
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
static Error visitMemberRecord(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
Provides read only access to a subclass of BinaryStream.
Error readEnum(T &Dest)
Similar to readInteger.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
The instances of the Type class are immutable: once they are created, they are never changed.
virtual Error visitUnknownMember(CVMemberRecord &Record)
virtual Error visitMemberEnd(CVMemberRecord &Record)
virtual Error visitMemberBegin(CVMemberRecord &Record)
A range adaptor for a pair of iterators.
Error visitMemberRecord(CVMemberRecord Record, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
Error visitTypeStream(const CVTypeArray &Types, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
TypeRecordKind
Distinguishes individual records in .debug$T or .debug$P section or PDB type stream.
Error visitTypeRecord(CVType &Record, TypeIndex Index, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
This is an optimization pass for GlobalISel generic memory operations.