[llvm] Adjust LDBG output: surround DebugType between `[` and `]` (PR #150671)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 25 11:13:54 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Mehdi Amini (joker-eph)

<details>
<summary>Changes</summary>

This makes the output more readable by clearly showing the current debug type as a keyword.

---
Full diff: https://github.com/llvm/llvm-project/pull/150671.diff


1 Files Affected:

- (modified) llvm/include/llvm/Support/DebugLog.h (+2-2) 


``````````diff
diff --git a/llvm/include/llvm/Support/DebugLog.h b/llvm/include/llvm/Support/DebugLog.h
index 9556bf2d6242d..964f033fb16cf 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) && {

``````````

</details>


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


More information about the llvm-commits mailing list