File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -32,14 +32,7 @@ class SwiftObjectFileFormat {
32
32
return {};
33
33
}
34
34
// / Predicate to identify if the named section can contain reflection data.
35
- virtual bool sectionContainsReflectionData (llvm::StringRef sectionName) {
36
- return sectionName == getSectionName (fieldmd) ||
37
- sectionName == getSectionName (assocty) ||
38
- sectionName == getSectionName (builtin) ||
39
- sectionName == getSectionName (capture) ||
40
- sectionName == getSectionName (typeref) ||
41
- sectionName == getSectionName (reflstr);
42
- }
35
+ virtual bool sectionContainsReflectionData (llvm::StringRef sectionName) = 0;
43
36
};
44
37
45
38
// / Responsible for providing the Mach-O reflection section identifiers.
@@ -96,6 +89,10 @@ class SwiftObjectFileFormatELF : public SwiftObjectFileFormat {
96
89
}
97
90
llvm_unreachable (" Section type not found." );
98
91
}
92
+
93
+ bool sectionContainsReflectionData (llvm::StringRef sectionName) override {
94
+ return sectionName.startswith (" swift5_" );
95
+ }
99
96
};
100
97
101
98
// / Responsible for providing the COFF reflection section identifiers
@@ -118,6 +115,10 @@ class SwiftObjectFileFormatCOFF : public SwiftObjectFileFormat {
118
115
}
119
116
llvm_unreachable (" Section not found." );
120
117
}
118
+
119
+ bool sectionContainsReflectionData (llvm::StringRef sectionName) override {
120
+ return sectionName.startswith (" .sw5" );
121
+ }
121
122
};
122
123
} // namespace swift
123
124
#endif // SWIFT_ABI_OBJECTFILE_H
You can’t perform that action at this time.
0 commit comments