[Mlir-commits] [mlir] [mlir][IR] MutableOperandRange: `operator[]` returns `OpOperand &` (PR #66515)

Mehdi Amini llvmlistbot at llvm.org
Sat Sep 16 21:08:33 PDT 2023


================
@@ -517,6 +517,10 @@ void MutableOperandRange::updateLength(unsigned newLength) {
   }
 }
 
+OpOperand &MutableOperandRange::operator[](unsigned index) const {
+  return owner->getOpOperand(start + index);
----------------
joker-eph wrote:

Shall we assert that index < size for this range?

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


More information about the Mlir-commits mailing list