Skip to content

Commit 04a44fe

Browse files
authored
[MLIR] Fix release build: FULL_LDBG macro was incorrect when NDEBUG is defined (#150698)
DEBUGLOG_WITH_STREAM_AND_TYPE is an internal implementation detail of LDBG in DebugLog.h. When NDEBUG is defined, DEBUGLOG_WITH_STREAM_AND_TYPE is not defined at all. Signed-off-by: Benoit Jacob <[email protected]>
1 parent 34a08cb commit 04a44fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mlir/lib/Dialect/Transform/Interfaces/TransformInterfaces.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@
2424
#define DEBUG_TYPE_FULL "transform-dialect-full"
2525
#define DEBUG_PRINT_AFTER_ALL "transform-dialect-print-top-level-after-all"
2626
#define DBGS() (llvm::dbgs() << "[" DEBUG_TYPE "] ")
27+
#ifndef NDEBUG
2728
#define FULL_LDBG(X) \
2829
DEBUGLOG_WITH_STREAM_AND_TYPE(llvm::dbgs(), DEBUG_TYPE_FULL)
30+
#else
31+
#define FULL_LDBG(X)
32+
#endif
2933

3034
using namespace mlir;
3135

0 commit comments

Comments
 (0)