================
@@ -277,6 +296,14 @@ void SPIRVTargetCodeGenInfo::setTargetAttributes(
auto FD = dyn_cast_or_null<FunctionDecl>(D);
if (!FD)
return;
+
+ if (FD->hasAttr<DeviceKernelAttr>())
+ F->setCallingConv(llvm::CallingConv::SPIR_KERNEL);
----------------
sarnex wrote:
Not sure if I understand the question but there is no SYCL-specific calling
convention,
[ex1](https://github.com/llvm/llvm-project/blob/c6a4e84a10ae8b163c9cae3f9a49eb8077a499ff/clang/include/clang/Basic/Specifiers.h#L291),
[ex2](https://github.com/llvm/llvm-project/blob/c6a4e84a10ae8b163c9cae3f9a49eb8077a499ff/llvm/include/llvm/IR/CallingConv.h#L144).
There is another alias (aka spelling) of the clang attribute but we have no
need to check which specific spelling it's using here.
https://github.com/llvm/llvm-project/pull/161905
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits