[clang] [CIR] Upstream cir.call with scalar arguments (PR #136810)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Thu May 1 10:46:43 PDT 2025


================
@@ -1516,6 +1520,41 @@ class CIR_CallOpBase<string mnemonic, list<Trait> extra_traits = []>
          !listconcat(extra_traits,
                      [DeclareOpInterfaceMethods<CIRCallOpInterface>,
                       DeclareOpInterfaceMethods<SymbolUserOpInterface>])> {
+  let extraClassDeclaration = [{
+    /// Get the argument operands to the called function.
+    mlir::OperandRange getArgOperands() {
+      return {arg_operand_begin(), arg_operand_end()};
+    }
+
+    mlir::MutableOperandRange getArgOperandsMutable() {
+      llvm_unreachable("NYI");
----------------
Lancern wrote:

This function is required by `CallOpInterface` and we have to keep it here. I have added the implementation for this function in the latest change, though.

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


More information about the cfe-commits mailing list