================ @@ -62,35 +63,51 @@ void offloading::emitOffloadingEntry(Module &M, Constant *Addr, StringRef Name, M.getDataLayout().getDefaultGlobalsAddressSpace()); // The entry has to be created in the section the linker expects it to be. - Entry->setSection(SectionName); + if (Triple.isOSBinFormatCOFF()) + Entry->setSection((SectionName + "$OE").str()); + else + Entry->setSection(SectionName); Entry->setAlignment(Align(1)); } std::pair<GlobalVariable *, GlobalVariable *> offloading::getOffloadEntryArray(Module &M, StringRef SectionName) { - auto *EntriesB = - new GlobalVariable(M, ArrayType::get(getEntryTy(M), 0), - /*isConstant=*/true, GlobalValue::ExternalLinkage, - /*Initializer=*/nullptr, "__start_" + SectionName); + llvm::Triple Triple(M.getTargetTriple()); ---------------- jhuber6 wrote:
I fixed the other occurrences, these should stay to separate the type as I prefer `llvm::Triple Triple` over `Triple TheTriple` or similar. https://github.com/llvm/llvm-project/pull/72697 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits