[Mlir-commits] [llvm] [mlir] Adjust LDBG output: surround DebugType between `[` and `]` (PR #150671)
Mehdi Amini
llvmlistbot at llvm.org
Fri Jul 25 11:33:30 PDT 2025
https://github.com/joker-eph updated https://github.com/llvm/llvm-project/pull/150671
>From 6ade786df5f79a52529c497a359bc3377bf81cc0 Mon Sep 17 00:00:00 2001
From: Mehdi Amini <joker.eph at gmail.com>
Date: Fri, 25 Jul 2025 11:10:04 -0700
Subject: [PATCH] Adjust LDBG output: surround DebugType between `[` and `]`
This makes the output more readable by clearly showing the current debug
type as a keyword.
---
llvm/include/llvm/Support/DebugLog.h | 4 ++--
mlir/test/Analysis/DataFlow/test-liveness-analysis.mlir | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/include/llvm/Support/DebugLog.h b/llvm/include/llvm/Support/DebugLog.h
index 9556bf2d6242d..4ce5e40975fbd 100644
--- a/llvm/include/llvm/Support/DebugLog.h
+++ b/llvm/include/llvm/Support/DebugLog.h
@@ -38,8 +38,8 @@ class LogWithNewline {
raw_ostream &os)
: os(os) {
if (debug_type)
- os << debug_type << " ";
- os << "[" << file << ":" << line << "] ";
+ os << "[" << debug_type << "]";
+ os << "" << file << ":" << line << " ";
}
~LogWithNewline() { os << '\n'; }
template <typename T> raw_ostream &operator<<(const T &t) && {
diff --git a/mlir/test/Analysis/DataFlow/test-liveness-analysis.mlir b/mlir/test/Analysis/DataFlow/test-liveness-analysis.mlir
index a89a0f4084e99..4a4992d987862 100644
--- a/mlir/test/Analysis/DataFlow/test-liveness-analysis.mlir
+++ b/mlir/test/Analysis/DataFlow/test-liveness-analysis.mlir
@@ -16,7 +16,7 @@ func.func @test_1_type_1.a(%arg0: memref<i32>) {
// where its op could take the control has an op with memory effects"
// %arg2 is live because it can make the control go into a block with a memory
// effecting op.
-// CHECK-LABEL: test_tag: br:
+// CHECK-LABEL: tesdddt_tag: br:
// CHECK-NEXT: operand #0: live
// CHECK-NEXT: operand #1: live
// CHECK-NEXT: operand #2: live
More information about the Mlir-commits
mailing list