================
@@ -866,7 +866,8 @@ const CGFunctionInfo &CodeGenTypes::arrangeLLVMFunctionInfo(
   assert(inserted && "Recursively being processed?");
 
   // Compute ABI information.
-  if (CC == llvm::CallingConv::SPIR_KERNEL) {
+  if (info.getCC() == CC_DeviceKernel &&
+      (CC == llvm::CallingConv::SPIR_KERNEL || CC == llvm::CallingConv::C)) {
----------------
sarnex wrote:

Would an assert like `assert(CC != llvm::CallingConv::CC || 
getContext().getLangOpts().OpenCL)` before the call to 
`computeSPIRKernelABIInfo` work? 

Basically I want to lock down that we only have `info.getCC() == 
CC_DeviceKernel` but LLVM CC `CallingConv::CC` for OpenCL, because in the 
general case if we see that that means the Clang CC to LLVM CC mapping did 
something crazy.

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

Reply via email to