[clang] [CIR] Upstream initial function call support (PR #134673)

Sirui Mu via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 8 07:55:23 PDT 2025


================
@@ -441,6 +441,87 @@ OpFoldResult cir::CastOp::fold(FoldAdaptor adaptor) {
   return tryFoldCastChain(*this);
 }
 
+//===----------------------------------------------------------------------===//
+// CallOp
+//===----------------------------------------------------------------------===//
+
+static mlir::ParseResult parseCallCommon(mlir::OpAsmParser &parser,
+                                         mlir::OperationState &result) {
+  mlir::FlatSymbolRefAttr calleeAttr;
+
+  if (!parser.parseOptionalAttribute(calleeAttr, "callee", result.attributes)
+           .has_value())
+    return mlir::failure();
+
+  if (parser.parseLParen())
+    return mlir::failure();
+
+  // TODO(cir): parse argument list here
----------------
Lancern wrote:

Updated.

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


More information about the cfe-commits mailing list