Loading mlir/include/mlir/IR/UseDefLists.h +4 −4 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public: /// the IR that uses 'this' to use the other value instead. When this returns /// there are zero uses of 'this'. void replaceAllUsesWith(typename OperandType::ValueType newValue) { assert(!newValue || this != OperandType::getUseList(newValue) && assert((!newValue || this != OperandType::getUseList(newValue)) && "cannot RAUW a value with itself"); while (!use_empty()) use_begin()->set(newValue); Loading Loading @@ -126,7 +126,7 @@ public: void replaceAllUsesWith(ValueType oldValue, ValueType newValue) { assert(this == OperandType::getUseList(oldValue) && "value not attached to this use list"); assert(!newValue || this != OperandType::getUseList(newValue) && assert((!newValue || this != OperandType::getUseList(newValue)) && "cannot RAUW a value with itself"); for (OperandType &use : llvm::make_early_inc_range(getUses(oldValue))) use.set(newValue); Loading Loading
mlir/include/mlir/IR/UseDefLists.h +4 −4 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ public: /// the IR that uses 'this' to use the other value instead. When this returns /// there are zero uses of 'this'. void replaceAllUsesWith(typename OperandType::ValueType newValue) { assert(!newValue || this != OperandType::getUseList(newValue) && assert((!newValue || this != OperandType::getUseList(newValue)) && "cannot RAUW a value with itself"); while (!use_empty()) use_begin()->set(newValue); Loading Loading @@ -126,7 +126,7 @@ public: void replaceAllUsesWith(ValueType oldValue, ValueType newValue) { assert(this == OperandType::getUseList(oldValue) && "value not attached to this use list"); assert(!newValue || this != OperandType::getUseList(newValue) && assert((!newValue || this != OperandType::getUseList(newValue)) && "cannot RAUW a value with itself"); for (OperandType &use : llvm::make_early_inc_range(getUses(oldValue))) use.set(newValue); Loading