[clang] [llvm] Stop using spir_kernel calling convention on non-SPIR targets. (PR #191090)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 9 17:59:12 PDT 2026


================
@@ -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)) {
----------------
efriedma-quic wrote:

Sure, assert added.

https://github.com/llvm/llvm-project/pull/191090


More information about the cfe-commits mailing list