[Mlir-commits] [mlir] [mlir] Cleanup dump() functions. (PR #89216)
Michael Kruse
llvmlistbot at llvm.org
Mon Apr 22 15:08:18 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();
----------------
Meinersbur wrote:
It's not about desirability, but following LLVM coding practice.
That can be changed of course, but will require changes through all of LLVM (due to changing the `LLVM_DUMP_METHOD` macro) and possibly require a community discussion. In the meantime, this would be the fix for making most `dump()` methods actually callable in the debugger. I'd add the suggested usability improvement to not declare those functions depending on `llvm-config.h` in a followup.
https://github.com/llvm/llvm-project/pull/89216
More information about the Mlir-commits
mailing list