[clang] [CIR] Add support for indirect calls (PR #139748)
Sirui Mu via cfe-commits
cfe-commits at lists.llvm.org
Sat May 17 08:30:41 PDT 2025
================
@@ -539,15 +573,16 @@ mlir::ParseResult cir::CallOp::parse(mlir::OpAsmParser &parser,
}
void cir::CallOp::print(mlir::OpAsmPrinter &p) {
- printCallCommon(*this, getCalleeAttr(), p);
+ mlir::Value indirectCallee = isIndirect() ? getIndirectCall() : nullptr;
+ printCallCommon(*this, getCalleeAttr(), indirectCallee, p);
}
static LogicalResult
verifyCallCommInSymbolUses(mlir::Operation *op,
SymbolTableCollection &symbolTable) {
auto fnAttr = op->getAttrOfType<FlatSymbolRefAttr>("callee");
if (!fnAttr)
- return mlir::failure();
+ return mlir::success();
----------------
Lancern wrote:
Yes. Added a comment.
https://github.com/llvm/llvm-project/pull/139748
More information about the cfe-commits
mailing list