[llvm] Fix `DEBUGLOG_WITH_STREAM_TYPE_AND_FILE` broken in #150750 (PR #150920)

Ingo Müller via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 03:32:16 PDT 2025


https://github.com/ingomueller-net created https://github.com/llvm/llvm-project/pull/150920

This PR fixes the `DEBUGLOG_WITH_STREAM_TYPE_AND_FILE` macro that got broken in #150750. That PR introduces a more sophisitaced version of that macro and refactored some code in that process, making the `getShortFileName` a free function instead of a class member function, but did not adapt this macro to the refactored code.

>From fe079dae2e579608653b25f29288334ba5923518 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20M=C3=BCller?= <ingomueller at google.com>
Date: Mon, 28 Jul 2025 10:29:29 +0000
Subject: [PATCH] Fix `DEBUGLOG_WITH_STREAM_TYPE_AND_FILE` broken in #150750
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This PR fixes the `DEBUGLOG_WITH_STREAM_TYPE_AND_FILE` macro that got
broken in #150750. That PR introduces a more sophisitaced version of
that macro and refactored some code in that process, making the
`getShortFileName` a free function instead of a class member function,
but did not adapt this macro to the refactored code.

Signed-off-by: Ingo Müller <ingomueller at google.com>
---
 llvm/include/llvm/Support/DebugLog.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/include/llvm/Support/DebugLog.h b/llvm/include/llvm/Support/DebugLog.h
index 19d309865bbd4..5e308eb993036 100644
--- a/llvm/include/llvm/Support/DebugLog.h
+++ b/llvm/include/llvm/Support/DebugLog.h
@@ -40,8 +40,8 @@ namespace llvm {
   DEBUGLOG_WITH_STREAM_TYPE_AND_FILE(STREAM, TYPE, __SHORT_FILE__)
 #else
 #define DEBUGLOG_WITH_STREAM_AND_TYPE(STREAM, TYPE)                            \
-  DEBUGLOG_WITH_STREAM_TYPE_AND_FILE(                                          \
-      STREAM, TYPE, ::llvm::impl::LogWithNewline::getShortFileName(__FILE__))
+  DEBUGLOG_WITH_STREAM_TYPE_AND_FILE(STREAM, TYPE,                             \
+                                     ::llvm::impl::getShortFileName(__FILE__))
 #endif
 
 namespace impl {



More information about the llvm-commits mailing list