File tree 1 file changed +13
-1
lines changed
llvm/lib/Frontend/Offloading
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) {
62
62
}
63
63
}
64
64
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
+
65
77
// / Wrapper helper class that creates all LLVM IRs wrapping given images.
66
78
// / Note: All created structures, "_pi_device_*", "__sycl_*" and "__tgt*" names
67
79
// / in this implementation are aligned with "sycl/include/sycl/detail/pi.h".
@@ -83,7 +95,7 @@ struct Wrapper {
83
95
84
96
SyclPropTy = getSyclPropTy ();
85
97
SyclPropSetTy = getSyclPropSetTy ();
86
- EntryTy = offloading::getEntryTy (M);
98
+ EntryTy = getLegacyOffloadEntryTy (M);
87
99
SyclDeviceImageTy = getSyclDeviceImageTy ();
88
100
SyclBinDescTy = getSyclBinDescTy ();
89
101
}
You can’t perform that action at this time.
0 commit comments