10 #ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEVISITORCALLBACKPIPELINE_H 11 #define LLVM_DEBUGINFO_CODEVIEW_TYPEVISITORCALLBACKPIPELINE_H 27 for (
auto Visitor : Pipeline) {
28 if (
auto EC = Visitor->visitUnknownType(Record))
35 for (
auto Visitor : Pipeline) {
36 if (
auto EC = Visitor->visitUnknownMember(Record))
43 for (
auto Visitor : Pipeline) {
44 if (
auto EC = Visitor->visitTypeBegin(Record))
51 for (
auto Visitor : Pipeline) {
52 if (
auto EC = Visitor->visitTypeBegin(Record, Index))
59 for (
auto Visitor : Pipeline) {
60 if (
auto EC = Visitor->visitTypeEnd(Record))
67 for (
auto Visitor : Pipeline) {
68 if (
auto EC = Visitor->visitMemberBegin(Record))
75 for (
auto Visitor : Pipeline) {
76 if (
auto EC = Visitor->visitMemberEnd(Record))
83 Pipeline.push_back(&Callbacks);
86 #define TYPE_RECORD(EnumName, EnumVal, Name) \ 87 Error visitKnownRecord(CVType &CVR, Name##Record &Record) override { \ 88 return visitKnownRecordImpl(CVR, Record); \ 90 #define MEMBER_RECORD(EnumName, EnumVal, Name) \ 91 Error visitKnownMember(CVMemberRecord &CVMR, Name##Record &Record) \ 93 return visitKnownMemberImpl(CVMR, Record); \ 95 #define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 96 #define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) 97 #include "llvm/DebugInfo/CodeView/CodeViewTypes.def" 100 template <
typename T> Error visitKnownRecordImpl(
CVType &CVR,
T &Record) {
101 for (
auto Visitor : Pipeline) {
102 if (
auto EC = Visitor->visitKnownRecord(CVR, Record))
108 template <
typename T>
109 Error visitKnownMemberImpl(CVMemberRecord &CVMR,
T &Record) {
110 for (
auto Visitor : Pipeline) {
111 if (
auto EC = Visitor->visitKnownMember(CVMR, Record))
116 std::vector<TypeVisitorCallbacks *> Pipeline;
122 #endif // LLVM_DEBUGINFO_CODEVIEW_TYPEVISITORCALLBACKPIPELINE_H
This class represents lattice values for constants.
CVRecord< TypeLeafKind > CVType
Error visitUnknownMember(CVMemberRecord &Record) override
Error visitTypeBegin(CVType &Record) override
Paired begin/end actions for all types.
TypeVisitorCallbackPipeline()=default
Error visitMemberBegin(CVMemberRecord &Record) override
static ErrorSuccess success()
Create a success value.
Error visitTypeBegin(CVType &Record, TypeIndex Index) override
Lightweight error class with error context and mandatory checking.
Error visitMemberEnd(CVMemberRecord &Record) override
Error visitTypeEnd(CVType &Record) override
void addCallbackToPipeline(TypeVisitorCallbacks &Callbacks)
Error visitUnknownType(CVRecord< TypeLeafKind > &Record) override