[Mlir-commits] [mlir] [mlir] Cleanup dump() functions. (PR #89216)
Mehdi Amini
llvmlistbot at llvm.org
Fri Apr 19 18:07:10 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:
This makes it possible to turn a compile-time failure into a link-time failure, that seems like a "regression" to me in behavior.
You mention a problem of flag divergence, however that's what llvm-config.h is here to resolve.
And actually there is a FIXME before the definition of `LLVM_DUMP_METHOD` to this effect:
> // FIXME: Move this to a private config.h as it's not usable in public headers.
https://github.com/llvm/llvm-project/pull/89216
More information about the Mlir-commits
mailing list