[Mlir-commits] [mlir] [mlir][llvm] Fixes CallOp builder for the case of indirect call (PR #76240)
Ivan R. Ivanov
llvmlistbot at llvm.org
Tue Dec 26 00:26:49 PST 2023
================
@@ -908,8 +908,9 @@ void CallOp::build(OpBuilder &builder, OperationState &state, TypeRange results,
void CallOp::build(OpBuilder &builder, OperationState &state, TypeRange results,
FlatSymbolRefAttr callee, ValueRange args) {
+ auto fargs = callee ? args : args.drop_front();
----------------
ivanradanov wrote:
```
Operation::operand_range CallOp::getArgOperands() {
return getOperands().drop_front(getCallee().has_value() ? 0 : 1);
}
```
We drop the first operand when it is not set so it should be inferred correctly.
https://github.com/llvm/llvm-project/pull/76240
More information about the Mlir-commits
mailing list