Skip to content

Commit 2d3018c

Browse files
committed
[SYCL] Disable OCL kernel stub for NativeCPU as well (#29074)
1 parent 1ce3803 commit 2d3018c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/CodeGen/TargetInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ unsigned TargetCodeGenInfo::getOpenCLKernelCallingConv() const {
119119

120120
void TargetCodeGenInfo::setOCLKernelStubCallingConvention(
121121
const FunctionType *&FT) const {
122+
123+
if (getABIInfo().getContext().getLangOpts().SYCLIsNativeCPU)
124+
return;
125+
122126
FT = getABIInfo().getContext().adjustFunctionType(
123127
FT, FT->getExtInfo().withCallingConv(CC_C));
124128
}

0 commit comments

Comments
 (0)