================ @@ -3586,9 +3586,16 @@ def CIR_OptionalPriorityAttr : OptionalAttr< > >; -// TODO(CIR): CallingConv is a placeholder here so we can use it in -// infrastructure calls, but it currently has no values. -def CIR_CallingConv : CIR_I32EnumAttr<"CallingConv", "calling convention", []>; +// The enumeration values are not necessarily in sync with `clang::CallingConv` +// or `llvm::CallingConv`. +def CIR_CallingConv : CIR_I32EnumAttr<"CallingConv", "calling convention", [ + I32EnumAttrCase<"C", 1, "c">, ---------------- ranapratap55 wrote:
Cases are now ordered to match the ordering in `llvm::CallingConv`. The integer values remain CIR-specific (0–4) rather than using LLVM's actual IDs. My assumption is CIR is target-agnostic IR, using LLVM dialect attribute directly would tie `cir.func` to LLVM backend at representation level, which contradicts CIR's layered design. https://github.com/llvm/llvm-project/pull/189345 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
