[Mlir-commits] [mlir] [MLIR] Add 'const' qualifier to some functions (PR #72430)

Mehdi Amini llvmlistbot at llvm.org
Fri Nov 17 22:31:34 PST 2023


================
@@ -182,10 +182,10 @@ class Value {
   /// Replace all uses of 'this' value with 'newValue' if the given callback
   /// returns true.
   void replaceUsesWithIf(Value newValue,
-                         function_ref<bool(OpOperand &)> shouldReplace);
+                         function_ref<bool(OpOperand &)> shouldReplace) const;
----------------
joker-eph wrote:

> mlir::Value::replaceAllUsesWith and mlir::Value::replaceAllUsesExcept also already use the const qualifier.

That is surprising to me, I need to investigate!

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


More information about the Mlir-commits mailing list