[clang] [clang][SPIR-V] Use the C calling convention as the target default (PR #210882)

Arseniy Obolenskiy via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 21:58:08 PDT 2026


================
@@ -8349,6 +8349,19 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr,
     return true;
 
   const FunctionType *fn = unwrapped.get();
+
+  // On amdgcnspirv, __cdecl on an abstract function type has no device-side
+  // equivalent, so normalize it to the device default CC to match an
+  // unadorned function type. Skip named decls and variadic types.
+  if (CC == CC_C && S.getLangOpts().CUDAIsDevice &&
----------------
aobolensk wrote:

Yes, added

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


More information about the cfe-commits mailing list