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

via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 03:32:47 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-support

Author: Ingo Müller (ingomueller-net)

<details>
<summary>Changes</summary>

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.

---
Full diff: https://github.com/llvm/llvm-project/pull/150920.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 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 {

``````````

</details>


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


More information about the llvm-commits mailing list