[clang] [CIR] Add support for indirect calls (PR #139748)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Thu May 15 11:49:34 PDT 2025


================
@@ -185,12 +193,26 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo &funcInfo,
 
   assert(!cir::MissingFeatures::invokeOp());
 
-  auto directFuncOp = dyn_cast<cir::FuncOp>(calleePtr);
-  assert(!cir::MissingFeatures::opCallIndirect());
+  cir::FuncType indirectFuncTy;
+  mlir::Value indirectFuncVal;
+  cir::FuncOp directFuncOp;
+  if (auto fnOp = dyn_cast<cir::FuncOp>(calleePtr))
----------------
andykaylor wrote:

The `if` statement should use braces since they are required by the `else`.

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


More information about the cfe-commits mailing list