[Mlir-commits] [mlir] [mlir] Cleanup dump() functions. (PR #89216)

Mehdi Amini llvmlistbot at llvm.org
Mon Apr 22 16:05:06 PDT 2024


================
@@ -1019,16 +1019,12 @@ class alignas(8) Operation final
 
   /// Expose a few methods explicitly for the debugger to call for
   /// visualization.
-#ifndef NDEBUG
-  LLVM_DUMP_METHOD operand_range debug_getOperands() { return getOperands(); }
-  LLVM_DUMP_METHOD result_range debug_getResults() { return getResults(); }
-  LLVM_DUMP_METHOD SuccessorRange debug_getSuccessors() {
-    return getSuccessors();
-  }
-  LLVM_DUMP_METHOD MutableArrayRef<Region> debug_getRegions() {
-    return getRegions();
-  }
-#endif
+  /// @{
+  operand_range debug_getOperands();
----------------
joker-eph wrote:

Sorry, I don't agree that this is a "coding practice" just because this is a pattern appearing somewhere else.
In particular the existing FIXME in the code acknowledge that this isn't how it should be setup, and I don't understand why changing this as you do right now is a good thing to do, instead of addressing the FIXME.

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


More information about the Mlir-commits mailing list