Skip to content

Commit 8849acf

Browse files
authored
Merge pull request #41021 from augusto2112/reflection-segment-name
Specify the segment name that contains the reflection sections.
2 parents 5cff292 + 6e088c3 commit 8849acf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

include/swift/ABI/ObjectFile.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class SwiftObjectFileFormat {
2828
public:
2929
virtual ~SwiftObjectFileFormat() {}
3030
virtual llvm::StringRef getSectionName(ReflectionSectionKind section) = 0;
31+
virtual llvm::Optional<llvm::StringRef> getSegmentName() {
32+
return {};
33+
}
3134
};
3235

3336
/// Responsible for providing the Mach-O reflection section identifiers.
@@ -50,6 +53,9 @@ class SwiftObjectFileFormatMachO : public SwiftObjectFileFormat {
5053
}
5154
llvm_unreachable("Section type not found.");
5255
}
56+
llvm::Optional<llvm::StringRef> getSegmentName() override {
57+
return {"__TEXT"};
58+
}
5359
};
5460

5561
/// Responsible for providing the ELF reflection section identifiers.

0 commit comments

Comments
 (0)