================
@@ -141,6 +166,15 @@ offloading::getOffloadEntryArray(Module &M, StringRef
SectionName) {
DummyEntry->setSection(SectionName);
DummyEntry->setAlignment(Align(object::OffloadBinary::getAlignment()));
appendToCompilerUsed(M, DummyEntry);
+ } else if (Triple.isOSBinFormatMachO()) {
+ // Mach-O needs a dummy variable in the section (like ELF) to ensure the
+ // linker provides the section boundary symbols.
+ auto *DummyEntry = new GlobalVariable(
+ M, ZeroInitilaizer->getType(), true, GlobalVariable::InternalLinkage,
+ ZeroInitilaizer, "__dummy." + SectionName);
----------------
pvelesko wrote:
Are current tests added in this PR not sufficient?
https://github.com/llvm/llvm-project/pull/183991
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits