[clang] [CIR] Add calling_conv attribute to FuncOp with lowering support (PR #189345)
Rana Pratap Reddy via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 31 09:54:38 PDT 2026
================
@@ -182,6 +182,27 @@ mlir::LLVM::Linkage convertLinkage(cir::GlobalLinkageKind linkage) {
llvm_unreachable("Unknown CIR linkage type");
}
+static mlir::LLVM::CConv convertCallingConv(cir::CallingConv callingConv) {
+ using CIR = cir::CallingConv;
+ using LLVM = mlir::LLVM::CConv;
+
+ switch (callingConv) {
+ case CIR::C:
+ return LLVM::C;
+ case CIR::SpirKernel:
+ return LLVM::SPIR_KERNEL;
+ case CIR::SpirFunction:
+ return LLVM::SPIR_FUNC;
+ case CIR::OpenCLKernel:
----------------
ranapratap55 wrote:
Replaced with an assert for OpenCLKernel.
https://github.com/llvm/llvm-project/pull/189345
More information about the cfe-commits
mailing list