Skip to content

Commit bdd5232

Browse files
committed
[SYCL][AMD] Guard kernel stub changes for SYCL
1 parent 3b170e3 commit bdd5232

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clang/lib/CodeGen/Targets/AMDGPU.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,10 @@ unsigned AMDGPUTargetCodeGenInfo::getOpenCLKernelCallingConv() const {
438438

439439
void AMDGPUTargetCodeGenInfo::setOCLKernelStubCallingConvention(
440440
const FunctionType *&FT) const {
441+
bool IsSYCL = getABIInfo().getContext().getLangOpts().isSYCL();
441442
FT = getABIInfo().getContext().adjustFunctionType(
442-
FT, FT->getExtInfo().withCallingConv(CC_AMDGPUKernelCall));
443+
FT,
444+
FT->getExtInfo().withCallingConv(!IsSYCL ? CC_C : CC_AMDGPUKernelCall));
443445
}
444446

445447
// Currently LLVM assumes null pointers always have value 0,

0 commit comments

Comments
 (0)