[clang] [clang][HIP] Normalize __cdecl on abstract function types to the device default CC on amdgcnspirv (PR #210882)

Tom Honermann via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 7 20:32:47 PDT 2026


https://github.com/tahonermann requested changes to this pull request.

Thank you for working on this, @aobolensk!

Assuming this PR is merged more or less as it is now, I think it affects more than just HIP. The change to the default calling convention will affect SYCL (in a good way). HLSL tests are clearly impacted. I think OpenCL is impacted too; note the explicit use of `CC_SpirFunction` in `CommonSPIRTargetCodeGenInfo::setOCLKernelStubCallingConvention()`.

I would love to see `CC_SpirFunction` removed after this PR is merged if at all possible.

I added a few comments, some of which note other places I think might require updates.

I am concerned that this PR will cause problems (not just for SYCL) if the error issued for varadic functions that aren't called by functions emitted during device compilation is not suppressed. That would seem to prevent including some prevalent headers on Windows.

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


More information about the cfe-commits mailing list