Skip to content

Commit 5a87103

Browse files
committed
[SYCL][CodeGenModule] Fix conflcit resolution for ed73121
Fix failure in device_global.
1 parent bbb0d8a commit 5a87103

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,8 @@ void CodeGenModule::EmitCtorList(CtorList &Fns, const char *GlobalName) {
20922092
ctor.addInt(Int32Ty, I.Priority);
20932093
ctor.add(I.Initializer);
20942094
if (I.AssociatedData)
2095-
ctor.add(I.AssociatedData);
2095+
ctor.add(llvm::ConstantExpr::getPointerBitCastOrAddrSpaceCast(
2096+
I.AssociatedData, TargetType));
20962097
else
20972098
ctor.addNullPointer(TargetType);
20982099
ctor.finishAndAddTo(ctors);

0 commit comments

Comments
 (0)