File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,20 @@ class SwiftObjectFileFormat {
31
31
virtual llvm::Optional<llvm::StringRef> getSegmentName () {
32
32
return {};
33
33
}
34
+ virtual bool sectionContainsReflectionData (llvm::StringRef sectionName) {
35
+ return getSectionName (fieldmd) == sectionName ||
36
+ getSectionName (assocty) == sectionName ||
37
+ getSectionName (builtin) == sectionName ||
38
+ getSectionName (capture) == sectionName ||
39
+ getSectionName (typeref) == sectionName ||
40
+ getSectionName (reflstr) == sectionName;
41
+ }
34
42
};
35
43
36
44
// / Responsible for providing the Mach-O reflection section identifiers.
37
45
class SwiftObjectFileFormatMachO : public SwiftObjectFileFormat {
46
+ using super = SwiftObjectFileFormat;
47
+
38
48
public:
39
49
llvm::StringRef getSectionName (ReflectionSectionKind section) override {
40
50
switch (section) {
@@ -56,6 +66,11 @@ class SwiftObjectFileFormatMachO : public SwiftObjectFileFormat {
56
66
llvm::Optional<llvm::StringRef> getSegmentName () override {
57
67
return {" __TEXT" };
58
68
}
69
+
70
+ bool sectionContainsReflectionData (llvm::StringRef sectionName) override {
71
+ return super::sectionContainsReflectionData (sectionName) ||
72
+ sectionName == " __DATA_CONST,__const" ;
73
+ }
59
74
};
60
75
61
76
// / Responsible for providing the ELF reflection section identifiers.
You can’t perform that action at this time.
0 commit comments