================
@@ -123,8 +123,9 @@ unsigned TargetCodeGenInfo::getDeviceKernelCallingConv() 
const {
     // conventions; different targets might split structs passed as values
     // to multiple function arguments etc.
     return llvm::CallingConv::SPIR_KERNEL;
+  } else {
+    return llvm::CallingConv::C;
----------------
Fznamznon wrote:

I'm not sure this is entirely right solution.
IMO we should probably ignore sycl_kernel attribute if the target is not 
offloading target, similar to amggpu_kernel attribute. However it maybe not 
worth doing if sycl_kernel attribute is going to be removed in favor of 
`clang::sycl_entry_point` attribute which BTW has the same crashing problem. cc 
@tahonermann 

https://github.com/llvm/llvm-project/pull/161349
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to