File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
llvm/lib/Frontend/Offloading Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,18 @@ int8_t binaryImageFormatToInt8(SYCLBinaryImageFormat Format) {
6262 }
6363}
6464
65+ StructType* getLegacyOffloadEntryTy (Module &M) {
66+ LLVMContext &C = M.getContext ();
67+ StructType *EntryTy =
68+ StructType::getTypeByName (C, " struct.__tgt_offload_entry" );
69+ if (!EntryTy)
70+ EntryTy = StructType::create (
71+ " struct.__tgt_offload_entry" , PointerType::getUnqual (C),
72+ PointerType::getUnqual (C), M.getDataLayout ().getIntPtrType (C),
73+ Type::getInt32Ty (C), Type::getInt32Ty (C));
74+ return EntryTy;
75+ }
76+
6577// / Wrapper helper class that creates all LLVM IRs wrapping given images.
6678// / Note: All created structures, "_pi_device_*", "__sycl_*" and "__tgt*" names
6779// / in this implementation are aligned with "sycl/include/sycl/detail/pi.h".
@@ -83,7 +95,7 @@ struct Wrapper {
8395
8496 SyclPropTy = getSyclPropTy ();
8597 SyclPropSetTy = getSyclPropSetTy ();
86- EntryTy = offloading::getEntryTy (M);
98+ EntryTy = getLegacyOffloadEntryTy (M);
8799 SyclDeviceImageTy = getSyclDeviceImageTy ();
88100 SyclBinDescTy = getSyclBinDescTy ();
89101 }
You can’t perform that action at this time.
0 commit comments