Go to the documentation of this file.
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))
121 return Error::success();
125 if (
auto EC = Callbacks.visitTypeBegin(
Record,
Index))
132 if (
auto EC = Callbacks.visitTypeBegin(
Record))
144 for (
auto I : Types) {
148 return Error::success();
152 for (
auto I : Types) {
156 return Error::success();
167 return Error::success();
172 while (!Reader.
empty()) {
173 if (
auto EC = Reader.
readEnum(Leaf))
182 return Error::success();
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);
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);
259 return V.Visitor.visitMemberRecord(
Record);
274 return V.Visitor.visitFieldListMemberStream(V.Reader);
This is an optimization pass for GlobalISel generic memory operations.
virtual Optional< TypeIndex > getFirst()=0
static ErrorSuccess success()
Create a success value.
The instances of the Type class are immutable: once they are created, they are never changed.
static Error visitMemberRecord(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
static Error finishVisitation(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
virtual Error visitMemberEnd(CVMemberRecord &Record)
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
virtual Error visitMemberBegin(CVMemberRecord &Record)
virtual Optional< TypeIndex > getNext(TypeIndex Prev)=0
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
virtual CVType getType(TypeIndex Index)=0
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)
Provides read only access to a subclass of BinaryStream.
static Error visitKnownRecord(CVType &Record, TypeVisitorCallbacks &Callbacks)
Error visitMemberRecord(CVMemberRecord Record, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
virtual Error visitUnknownMember(CVMemberRecord &Record)
Lightweight error class with error context and mandatory checking.
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
Error readEnum(T &Dest)
Similar to readInteger.
TypeLeafKind
Duplicate copy of the above enum, but using the official CV names.
Error visitTypeStream(const CVTypeArray &Types, TypeVisitorCallbacks &Callbacks, VisitorDataSource Source=VDS_BytesPresent)
Reimplement select in terms of SEL *We would really like to support but we need to prove that the add doesn t need to overflow between the two bit chunks *Implement pre post increment support(e.g. PR935) *Implement smarter const ant generation for binops with large immediates. A few ARMv6T2 ops should be pattern matched
A range adaptor for a pair of iterators.