[llvm] [clang] [llvm][frontend][offloading] Move clang-linker-wrapper/OffloadWrapper.* to llvm/Frontend/Offloading (PR #78057)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 14 09:58:14 PST 2024
================
@@ -568,32 +590,45 @@ void createRegisterFatbinFunction(Module &M, GlobalVariable *FatbinDesc,
} // namespace
-Error wrapOpenMPBinaries(Module &M, ArrayRef<ArrayRef<char>> Images) {
- GlobalVariable *Desc = createBinDesc(M, Images);
+Error OffloadWrapper::wrapOpenMPBinaries(
+ Module &M, ArrayRef<ArrayRef<char>> Images,
+ std::optional<EntryArrayTy> EntryArray) const {
+ GlobalVariable *Desc = createBinDesc(
+ M, Images,
+ EntryArray
+ ? *EntryArray
+ : offloading::getOffloadEntryArray(M, "omp_offloading_entries"),
----------------
jhuber6 wrote:
Thinking that this argument shouldn't be default, it should be up to whoever calls it to create such an array. For the linker wrapper it would be getting the offloading utility first. Making these arrays is quite complicated for implicit default behavior if we're expecting other things to happen I feel.
https://github.com/llvm/llvm-project/pull/78057
More information about the cfe-commits
mailing list