================ @@ -464,15 +464,35 @@ OpFoldResult cir::CastOp::fold(FoldAdaptor adaptor) { // CallOp //===----------------------------------------------------------------------===// +mlir::OperandRange cir::CallOp::getArgOperands() { + if (isIndirect()) + return getArgs().drop_front(1); + return getArgs(); +} + +mlir::MutableOperandRange cir::CallOp::getArgOperandsMutable() { + mlir::MutableOperandRange args = getArgsMutable(); + if (isIndirect()) + return args.slice(1, args.size() - 1); ---------------- Lancern wrote:
Yes. That's why `getArgOperandsMutable` and `getArgOperands` are implemented a bit differently. It would be nice to also have `drop_front` in `mlir::MutableOperandRange` though. https://github.com/llvm/llvm-project/pull/139748 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits