================
@@ -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:

Think it should be fine to just call this with 
`offloading::getOffloadEntryArray(M, "xxx_offloading_entries")` at the 
callsite. `std::optional` makes it a little weird here.

https://github.com/llvm/llvm-project/pull/78057
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to