Skip to content

Conversation

@jpienaar
Copy link
Member

Add macro that mirror a common usage of logging to output (e.g., one I invariably end up creating locally often). This makes it easy to have streaming log like behavior while still using the base debug logging.

I also wanted to avoid inventing a full logging library here while enabling others to change the sink without too much pain, so put it in its own header (this also avoids making Debug depend on raw_ostream beyond forward reference). The should allow a consistent dev experience without fixing the sink too much.

@llvmbot
Copy link
Member

llvmbot commented Jun 11, 2025

@llvm/pr-subscribers-llvm-support

Author: Jacques Pienaar (jpienaar)

Changes

Add macro that mirror a common usage of logging to output (e.g., one I invariably end up creating locally often). This makes it easy to have streaming log like behavior while still using the base debug logging.

I also wanted to avoid inventing a full logging library here while enabling others to change the sink without too much pain, so put it in its own header (this also avoids making Debug depend on raw_ostream beyond forward reference). The should allow a consistent dev experience without fixing the sink too much.


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

2 Files Affected:

  • (added) llvm/include/llvm/Support/DebugLog.h (+69)
  • (added) llvm/unittests/Support/DebugLogTest.cpp (+39)
diff --git a/llvm/include/llvm/Support/DebugLog.h b/llvm/include/llvm/Support/DebugLog.h
new file mode 100644
index 0000000000000..d83c951bd23e2
--- /dev/null
+++ b/llvm/include/llvm/Support/DebugLog.h
@@ -0,0 +1,69 @@
+//===- llvm/Support/DebugLog.h - Logging like debug output ------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+// This file contains macros for logging like debug output. It builds upon the
+// support in Debug.h but provides a utility function for common debug output
+// style.
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_SUPPORT_DEBUGLOG_H
+#define LLVM_SUPPORT_DEBUGLOG_H
+
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
+
+namespace llvm {
+#ifndef NDEBUG
+
+// Output with given inputs and trailing newline. E.g.,
+//   LLVM_DLOG() << "Bitset contains: " << Bitset;
+// is equivalent to
+//   LLVM_DEBUG(dbgs() << DEBUG_TYPE << " " << __FILE__ << ":" << __LINE__
+//              << "] " << "Bitset contains: " << Bitset << "\n");
+#define LLVM_DLOG(...)                                                         \
+  DEBUGLOG_WITH_STREAM_AND_TYPE(llvm::dbgs(), DEBUG_TYPE, __VA_ARGS__)
+
+#define DEBUGLOG_WITH_STREAM_AND_TYPE(STREAM, TYPE, ...)                       \
+  for (bool _c = (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)); _c;  \
+       _c = false)                                                             \
+  ::llvm::impl::LogWithNewline(TYPE, __FILE__, __LINE__, (STREAM))
+
+namespace impl {
+class LogWithNewline {
+public:
+  LogWithNewline(const char *debug_type, const char *file, int line,
+                 raw_ostream &os)
+      : os(os) {
+    if (debug_type)
+      os << debug_type << " ";
+    os << file << ":" << line << "] ";
+  }
+  ~LogWithNewline() { os << '\n'; }
+  template <typename T> raw_ostream &operator<<(const T &t) && {
+    return os << t;
+  }
+
+  // Prevent copying, as this class manages newline responsibility and is
+  // intended for use as a temporary.
+  LogWithNewline(const LogWithNewline &) = delete;
+  LogWithNewline &operator=(const LogWithNewline &) = delete;
+  LogWithNewline &operator=(LogWithNewline &&) = delete;
+
+private:
+  raw_ostream &os;
+};
+} // end namespace impl
+#else
+// As others in Debug, When compiling without assertions, the -debug-* options
+// and all inputs too LLVM_DLOG() are ignored.
+#define LLVM_DLOG(...)                                                         \
+  for (bool _c = false; _c; _c = false)                                        \
+  ::llvm::nulls()
+#endif
+} // end namespace llvm
+
+#endif // LLVM_SUPPORT_DEBUGLOG_H
diff --git a/llvm/unittests/Support/DebugLogTest.cpp b/llvm/unittests/Support/DebugLogTest.cpp
new file mode 100644
index 0000000000000..84208f5dc7e40
--- /dev/null
+++ b/llvm/unittests/Support/DebugLogTest.cpp
@@ -0,0 +1,39 @@
+//===- llvm/unittest/Support/DebugLogTest.cpp ------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Support/DebugLog.h"
+#include "llvm/Support/raw_ostream.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+
+#include <string>
+using namespace llvm;
+using testing::HasSubstr;
+
+#ifndef NDEBUG
+TEST(DebugLogTest, Basic) {
+  std::string s1, s2;
+  raw_string_ostream os1(s1), os2(s2);
+  static const char *DT[] = {"A", "B"};
+
+  llvm::DebugFlag = true;
+  setCurrentDebugTypes(DT, 2);
+  DEBUGLOG_WITH_STREAM_AND_TYPE(os1, "A") << "A";
+  DEBUGLOG_WITH_STREAM_AND_TYPE(os1, "B") << "B";
+  EXPECT_THAT(os1.str(), AllOf(HasSubstr("A\n"), HasSubstr("B\n")));
+
+  setCurrentDebugType("A");
+  volatile int x = 0;
+  if (x == 0)
+    DEBUGLOG_WITH_STREAM_AND_TYPE(os2, "A") << "A";
+  else
+    DEBUGLOG_WITH_STREAM_AND_TYPE(os2, "A") << "B";
+  DEBUGLOG_WITH_STREAM_AND_TYPE(os2, "B") << "B";
+  EXPECT_THAT(os2.str(), AllOf(HasSubstr("A\n"), Not(HasSubstr("B\n"))));
+}
+#endif

@github-actions
Copy link

github-actions bot commented Jun 11, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

jpienaar added 3 commits July 8, 2025 13:53
Add macro that mirror a common usage of logging to output (e.g., one I
invariably end up creating locally often). This makes it easy to have
streaming log like behavior while still using the base debug logging.

I also wanted to avoid inventing a full logging library here while
enabling others to change the sink without too much pain, so put it in
its own header (this also avoids making Debug depend on raw_ostream
beyond forward reference). The should allow a consistent dev experience
without fixing the sink too much.
@joker-eph
Copy link
Collaborator

This looks really nice!

@jpienaar jpienaar requested a review from joker-eph July 16, 2025 20:32
Copy link
Collaborator

@joker-eph joker-eph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think it can really help improving our debug outputs!

#ifndef LLVM_SUPPORT_DEBUGLOG_H
#define LLVM_SUPPORT_DEBUGLOG_H

#include "llvm/Support/Debug.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you considered making this part of the Debug.h header directly?

jpienaar and others added 2 commits July 23, 2025 12:15
@jpienaar jpienaar changed the title [llvm][support] Add LLVM_DLOG macro. [llvm][support] Add LDBG macro. Jul 24, 2025
@jpienaar jpienaar merged commit d368d11 into llvm:main Jul 25, 2025
9 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 25, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-win-fast running on as-builder-3 while building llvm at step 7 "test-build-unified-tree-check-llvm-unit".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/29743

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm-unit) failure: test (failure)
...
[733/756] Building CXX object unittests\XRay\CMakeFiles\XRayTests.dir\FDRRecordsTest.cpp.obj
[734/756] Building CXX object unittests\XRay\CMakeFiles\XRayTests.dir\ProfileTest.cpp.obj
[735/756] Building CXX object unittests\tools\llvm-mca\CMakeFiles\LLVMMCATests.dir\MCATestBase.cpp.obj
[736/756] Building CXX object unittests\tools\llvm-profgen\CMakeFiles\LLVMProfgenTests.dir\ContextCompressionTest.cpp.obj
[737/756] Linking CXX executable unittests\TextAPI\TextAPITests.exe
[738/756] Linking CXX executable unittests\tools\llvm-profgen\LLVMProfgenTests.exe
[739/756] Linking CXX executable unittests\XRay\XRayTests.exe
[740/756] Linking CXX executable unittests\tools\llvm-mca\LLVMMCATests.exe
[741/756] Linking CXX executable unittests\tools\llvm-profdata\LLVMProfdataTests.exe
[742/756] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\DebugLogTest.cpp.obj
FAILED: unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.obj 
C:\ninja\ccache.exe C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe  /nologo /TP -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\unittests\Support -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Support -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googletest\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\third-party\unittest\googlemock\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -MD  /EHs-c- /GR- -std:c++17 /showIncludes /Founittests\Support\CMakeFiles\SupportTests.dir\DebugLogTest.cpp.obj /Fdunittests\Support\CMakeFiles\SupportTests.dir\ /FS -c C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Support\DebugLogTest.cpp
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\unittests\Support\DebugLogTest.cpp(69): error C2466: cannot allocate an array of constant size 0
[743/756] Linking CXX executable unittests\Passes\PassBuilderBindings\PassesBindingsTests.exe
[744/756] Linking CXX executable unittests\IR\IRTests.exe
[745/756] Linking CXX executable unittests\Transforms\Vectorize\VectorizeTests.exe
[746/756] Linking CXX executable unittests\Transforms\Vectorize\SandboxVectorizer\SandboxVectorizerTests.exe
[747/756] Linking CXX executable unittests\Transforms\IPO\IPOTests.exe
[748/756] Linking CXX executable unittests\Target\TargetMachineCTests.exe
[749/756] Linking CXX executable unittests\Target\ARM\ARMTests.exe
[750/756] Linking CXX executable unittests\tools\llvm-exegesis\LLVMExegesisTests.exe
[751/756] Linking CXX executable unittests\Transforms\Coroutines\CoroTests.exe
[752/756] Linking CXX executable unittests\Transforms\Instrumentation\InstrumentationTests.exe
[753/756] Linking CXX executable unittests\Transforms\Utils\UtilsTests.exe
[754/756] Linking CXX executable unittests\Transforms\Scalar\ScalarTests.exe
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 25, 2025

LLVM Buildbot has detected a new failure on builder clang-hip-vega20 running on hip-vega20-0 while building llvm at step 3 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/24051

Here is the relevant piece of the build log for the reference
Step 3 (annotate) failure: '../llvm-zorg/zorg/buildbot/builders/annotated/hip-build.sh --jobs=' (failure)
...
[57/59] Linking CXX executable External/HIP/math_h-hip-6.3.0
[58/59] Building CXX object External/HIP/CMakeFiles/TheNextWeek-hip-6.3.0.dir/workload/ray-tracing/TheNextWeek/main.cc.o
[59/59] Linking CXX executable External/HIP/TheNextWeek-hip-6.3.0
+ build_step 'Testing HIP test-suite'
+ echo '@@@BUILD_STEP Testing HIP test-suite@@@'
+ ninja check-hip-simple
@@@BUILD_STEP Testing HIP test-suite@@@
[0/1] cd /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP && /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/bin/llvm-lit -sv array-hip-6.3.0.test empty-hip-6.3.0.test with-fopenmp-hip-6.3.0.test saxpy-hip-6.3.0.test memmove-hip-6.3.0.test split-kernel-args-hip-6.3.0.test builtin-logb-scalbn-hip-6.3.0.test TheNextWeek-hip-6.3.0.test algorithm-hip-6.3.0.test cmath-hip-6.3.0.test complex-hip-6.3.0.test math_h-hip-6.3.0.test new-hip-6.3.0.test blender.test
-- Testing: 14 tests, 14 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: test-suite :: External/HIP/blender.test (14 of 14)
******************** TEST 'test-suite :: External/HIP/blender.test' FAILED ********************

/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/tools/timeit-target --timeout 7200 --limit-core 0 --limit-cpu 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --append-exitstatus --redirect-output /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP/Output/blender.test.out --redirect-input /dev/null --summary /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP/Output/blender.test.time /bin/bash test_blender.sh
/bin/bash verify_blender.sh /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP/Output/blender.test.out
Begin Blender test.
TEST_SUITE_HIP_ROOT=/opt/botworker/llvm/External/hip
Render /opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo_release.blend
Blender 4.1.1 (hash e1743a0317bc built 2024-04-15 23:47:45)
Read blend: "/opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo_release.blend"
Could not open as Ogawa file from provided streams.
Unable to open /opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.002", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.003", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.004", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.001", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
Could not open as Ogawa file from provided streams.
Unable to open /opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.002", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.003", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.004", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.001", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
I0725 05:08:38.941233 4047662 device.cpp:39] HIPEW initialization succeeded
I0725 05:08:38.943205 4047662 device.cpp:45] Found HIPCC hipcc
I0725 05:08:39.000425 4047662 device.cpp:207] Device has compute preemption or is not used for display.
I0725 05:08:39.000491 4047662 device.cpp:211] Added device "" with id "HIP__0000:a3:00".
I0725 05:08:39.000576 4047662 device.cpp:568] Mapped host memory limit set to 536,444,985,344 bytes. (499.60G)
I0725 05:08:39.000821 4047662 device_impl.cpp:63] Using AVX2 CPU kernels.
Fra:1 Mem:524.00M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Eyepiece_rim
Fra:1 Mem:524.00M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.008
Fra:1 Mem:524.07M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.009
Fra:1 Mem:524.15M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.011
Fra:1 Mem:524.18M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.015
Fra:1 Mem:524.30M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.017
Fra:1 Mem:524.60M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Curve_Cables.004
Fra:1 Mem:524.76M (Peak 524.76M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.019
Fra:1 Mem:525.28M (Peak 525.28M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.020
Step 12 (Testing HIP test-suite) failure: Testing HIP test-suite (failure)
@@@BUILD_STEP Testing HIP test-suite@@@
[0/1] cd /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP && /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/llvm/bin/llvm-lit -sv array-hip-6.3.0.test empty-hip-6.3.0.test with-fopenmp-hip-6.3.0.test saxpy-hip-6.3.0.test memmove-hip-6.3.0.test split-kernel-args-hip-6.3.0.test builtin-logb-scalbn-hip-6.3.0.test TheNextWeek-hip-6.3.0.test algorithm-hip-6.3.0.test cmath-hip-6.3.0.test complex-hip-6.3.0.test math_h-hip-6.3.0.test new-hip-6.3.0.test blender.test
-- Testing: 14 tests, 14 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90
FAIL: test-suite :: External/HIP/blender.test (14 of 14)
******************** TEST 'test-suite :: External/HIP/blender.test' FAILED ********************

/home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/tools/timeit-target --timeout 7200 --limit-core 0 --limit-cpu 7200 --limit-file-size 209715200 --limit-rss-size 838860800 --append-exitstatus --redirect-output /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP/Output/blender.test.out --redirect-input /dev/null --summary /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP/Output/blender.test.time /bin/bash test_blender.sh
/bin/bash verify_blender.sh /home/botworker/bbot/clang-hip-vega20/botworker/clang-hip-vega20/test-suite-build/External/HIP/Output/blender.test.out
Begin Blender test.
TEST_SUITE_HIP_ROOT=/opt/botworker/llvm/External/hip
Render /opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo_release.blend
Blender 4.1.1 (hash e1743a0317bc built 2024-04-15 23:47:45)
Read blend: "/opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo_release.blend"
Could not open as Ogawa file from provided streams.
Unable to open /opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.002", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.003", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.004", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.001", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
Could not open as Ogawa file from provided streams.
Unable to open /opt/botworker/llvm/External/hip/Blender_Scenes/290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.002", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.003", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.004", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
WARN (bke.modifier): source/blender/blenkernel/intern/modifier.cc:425 BKE_modifier_set_error: Object: "GEO-flag.001", Modifier: "MeshSequenceCache", Could not create reader for file //290skydemo2_flags.abc
I0725 05:08:38.941233 4047662 device.cpp:39] HIPEW initialization succeeded
I0725 05:08:38.943205 4047662 device.cpp:45] Found HIPCC hipcc
I0725 05:08:39.000425 4047662 device.cpp:207] Device has compute preemption or is not used for display.
I0725 05:08:39.000491 4047662 device.cpp:211] Added device "" with id "HIP__0000:a3:00".
I0725 05:08:39.000576 4047662 device.cpp:568] Mapped host memory limit set to 536,444,985,344 bytes. (499.60G)
I0725 05:08:39.000821 4047662 device_impl.cpp:63] Using AVX2 CPU kernels.
Fra:1 Mem:524.00M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Eyepiece_rim
Fra:1 Mem:524.00M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.008
Fra:1 Mem:524.07M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.009
Fra:1 Mem:524.15M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.011
Fra:1 Mem:524.18M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.015
Fra:1 Mem:524.30M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.017
Fra:1 Mem:524.60M (Peak 524.70M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Curve_Cables.004
Fra:1 Mem:524.76M (Peak 524.76M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.019
Fra:1 Mem:525.28M (Peak 525.28M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.020
Fra:1 Mem:525.29M (Peak 525.29M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.021
Fra:1 Mem:525.34M (Peak 525.34M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.022
Fra:1 Mem:525.54M (Peak 525.54M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.023
Fra:1 Mem:525.71M (Peak 525.71M) | Time:00:00.69 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Rivets.024
Fra:1 Mem:526.43M (Peak 526.43M) | Time:00:00.70 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Curve_Connectors.009
Fra:1 Mem:526.52M (Peak 526.52M) | Time:00:00.70 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Curve_Connectors.010
Fra:1 Mem:526.82M (Peak 526.82M) | Time:00:00.70 | Mem:0.00M, Peak:0.00M | Scene, View Layer | Synchronizing object | GEO-Curve_Connectors.011

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 25, 2025

LLVM Buildbot has detected a new failure on builder clang-x64-windows-msvc running on windows-gcebot2 while building llvm at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/63/builds/8163

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/clang-windows.py ...' (failure)
...
[19/80] Linking CXX executable unittests\Object\ObjectTests.exe
[20/80] Linking CXX executable unittests\MC\MCTests.exe
[21/80] Linking CXX executable unittests\ObjectYAML\ObjectYAMLTests.exe
[22/80] Linking CXX executable unittests\ProfileData\ProfileDataTests.exe
[23/80] Linking CXX executable unittests\SandboxIR\SandboxIRTests.exe
[24/80] Linking CXX executable unittests\Analysis\AnalysisTests.exe
[25/80] Linking CXX executable unittests\ExecutionEngine\Orc\OrcJITTests.exe
[26/80] Linking CXX executable unittests\Frontend\LLVMFrontendTests.exe
[27/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-include-fixer\find-all-symbols\FindAllSymbolsTests.exe
[28/80] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\DebugLogTest.cpp.obj
FAILED: unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.obj 
C:\PROGRA~2\MICROS~3\2019\PROFES~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\b\slave\clang-x64-windows-msvc\build\stage1\unittests\Support -IC:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\unittests\Support -IC:\b\slave\clang-x64-windows-msvc\build\stage1\include -IC:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\include -IC:\b\slave\clang-x64-windows-msvc\llvm-project\third-party\unittest\googletest\include -IC:\b\slave\clang-x64-windows-msvc\llvm-project\third-party\unittest\googlemock\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -std:c++17 -MD  /EHs-c- /GR- /showIncludes /Founittests\Support\CMakeFiles\SupportTests.dir\DebugLogTest.cpp.obj /Fdunittests\Support\CMakeFiles\SupportTests.dir\ /FS -c C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\unittests\Support\DebugLogTest.cpp
C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\unittests\Support\DebugLogTest.cpp(69): error C2466: cannot allocate an array of constant size 0
[29/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-include-fixer\ClangIncludeFixerTests.exe
[30/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-move\ClangMoveTests.exe
[31/80] Linking CXX executable tools\clang\tools\extra\include-cleaner\unittests\ClangIncludeCleanerTests.exe
[32/80] Linking CXX executable unittests\Passes\PassBuilderBindings\PassesBindingsTests.exe
[33/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-doc\ClangDocTests.exe
[34/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-change-namespace\ClangChangeNamespaceTests.exe
[35/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-query\ClangQueryTests.exe
[36/80] Linking CXX executable unittests\IR\IRTests.exe
[37/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-tidy\ClangTidyTests.exe
[38/80] Linking CXX executable unittests\ExecutionEngine\MCJIT\MCJITTests.exe
[39/80] Linking CXX executable unittests\Target\AArch64\AArch64Tests.exe
[40/80] Linking CXX executable unittests\MC\AMDGPU\AMDGPUMCTests.exe
[41/80] Linking CXX executable unittests\Target\LoongArch\LoongArchTests.exe
[42/80] Linking CXX executable unittests\Target\PowerPC\PowerPCTests.exe
[43/80] Linking CXX executable unittests\Target\ARM\ARMTests.exe
[44/80] Linking CXX executable unittests\Transforms\Coroutines\CoroTests.exe
[45/80] Linking CXX executable unittests\Target\RISCV\RISCVTests.exe
[46/80] Linking CXX executable unittests\Target\AMDGPU\AMDGPUTests.exe
[47/80] Linking CXX executable unittests\CodeGen\CGPluginTest\CGPluginTest.exe
[48/80] Linking CXX executable tools\clang\tools\extra\clangd\unittests\ClangdTests.exe
[49/80] Linking CXX executable unittests\CodeGen\CodeGenTests.exe
[50/80] Linking CXX executable unittests\CodeGen\GlobalISel\GlobalISelTests.exe
[51/80] Linking CXX executable unittests\DebugInfo\DWARF\DebugInfoDWARFTests.exe
[52/80] Linking CXX executable unittests\Target\TargetMachineCTests.exe
[53/80] Linking CXX executable unittests\MIR\MIRTests.exe
[54/80] Linking CXX executable unittests\MI\MITests.exe
[55/80] Linking CXX executable unittests\DebugInfo\LogicalView\DebugInfoLogicalViewTests.exe
[56/80] Linking CXX executable tools\lld\unittests\AsLibAll\LLDAsLibAllTests.exe
[57/80] Linking CXX executable tools\lld\unittests\AsLibELF\LLDAsLibELFTests.exe
[58/80] Linking CXX executable tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe
[59/80] Linking CXX executable tools\clang\unittests\AllClangUnitTests.exe
ninja: build stopped: subcommand failed.
Command 'ninja' failed with return code 1
@@@STEP_FAILURE@@@
Step 8 (stage 1 check) failure: stage 1 check (failure)
...
[19/80] Linking CXX executable unittests\Object\ObjectTests.exe
[20/80] Linking CXX executable unittests\MC\MCTests.exe
[21/80] Linking CXX executable unittests\ObjectYAML\ObjectYAMLTests.exe
[22/80] Linking CXX executable unittests\ProfileData\ProfileDataTests.exe
[23/80] Linking CXX executable unittests\SandboxIR\SandboxIRTests.exe
[24/80] Linking CXX executable unittests\Analysis\AnalysisTests.exe
[25/80] Linking CXX executable unittests\ExecutionEngine\Orc\OrcJITTests.exe
[26/80] Linking CXX executable unittests\Frontend\LLVMFrontendTests.exe
[27/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-include-fixer\find-all-symbols\FindAllSymbolsTests.exe
[28/80] Building CXX object unittests\Support\CMakeFiles\SupportTests.dir\DebugLogTest.cpp.obj
FAILED: unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.obj 
C:\PROGRA~2\MICROS~3\2019\PROFES~1\VC\Tools\MSVC\1428~1.293\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\b\slave\clang-x64-windows-msvc\build\stage1\unittests\Support -IC:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\unittests\Support -IC:\b\slave\clang-x64-windows-msvc\build\stage1\include -IC:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\include -IC:\b\slave\clang-x64-windows-msvc\llvm-project\third-party\unittest\googletest\include -IC:\b\slave\clang-x64-windows-msvc\llvm-project\third-party\unittest\googlemock\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -std:c++17 -MD  /EHs-c- /GR- /showIncludes /Founittests\Support\CMakeFiles\SupportTests.dir\DebugLogTest.cpp.obj /Fdunittests\Support\CMakeFiles\SupportTests.dir\ /FS -c C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\unittests\Support\DebugLogTest.cpp
C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\unittests\Support\DebugLogTest.cpp(69): error C2466: cannot allocate an array of constant size 0
[29/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-include-fixer\ClangIncludeFixerTests.exe
[30/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-move\ClangMoveTests.exe
[31/80] Linking CXX executable tools\clang\tools\extra\include-cleaner\unittests\ClangIncludeCleanerTests.exe
[32/80] Linking CXX executable unittests\Passes\PassBuilderBindings\PassesBindingsTests.exe
[33/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-doc\ClangDocTests.exe
[34/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-change-namespace\ClangChangeNamespaceTests.exe
[35/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-query\ClangQueryTests.exe
[36/80] Linking CXX executable unittests\IR\IRTests.exe
[37/80] Linking CXX executable tools\clang\tools\extra\unittests\clang-tidy\ClangTidyTests.exe
[38/80] Linking CXX executable unittests\ExecutionEngine\MCJIT\MCJITTests.exe
[39/80] Linking CXX executable unittests\Target\AArch64\AArch64Tests.exe
[40/80] Linking CXX executable unittests\MC\AMDGPU\AMDGPUMCTests.exe
[41/80] Linking CXX executable unittests\Target\LoongArch\LoongArchTests.exe
[42/80] Linking CXX executable unittests\Target\PowerPC\PowerPCTests.exe
[43/80] Linking CXX executable unittests\Target\ARM\ARMTests.exe
[44/80] Linking CXX executable unittests\Transforms\Coroutines\CoroTests.exe
[45/80] Linking CXX executable unittests\Target\RISCV\RISCVTests.exe
[46/80] Linking CXX executable unittests\Target\AMDGPU\AMDGPUTests.exe
[47/80] Linking CXX executable unittests\CodeGen\CGPluginTest\CGPluginTest.exe
[48/80] Linking CXX executable tools\clang\tools\extra\clangd\unittests\ClangdTests.exe
[49/80] Linking CXX executable unittests\CodeGen\CodeGenTests.exe
[50/80] Linking CXX executable unittests\CodeGen\GlobalISel\GlobalISelTests.exe
[51/80] Linking CXX executable unittests\DebugInfo\DWARF\DebugInfoDWARFTests.exe
[52/80] Linking CXX executable unittests\Target\TargetMachineCTests.exe
[53/80] Linking CXX executable unittests\MIR\MIRTests.exe
[54/80] Linking CXX executable unittests\MI\MITests.exe
[55/80] Linking CXX executable unittests\DebugInfo\LogicalView\DebugInfoLogicalViewTests.exe
[56/80] Linking CXX executable tools\lld\unittests\AsLibAll\LLDAsLibAllTests.exe
[57/80] Linking CXX executable tools\lld\unittests\AsLibELF\LLDAsLibELFTests.exe
[58/80] Linking CXX executable tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe
[59/80] Linking CXX executable tools\clang\unittests\AllClangUnitTests.exe
ninja: build stopped: subcommand failed.
Command 'ninja' failed with return code 1
program finished with exit code 0
elapsedTime=103.437000

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 25, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu-no-asserts running on doug-worker-6 while building llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/202/builds/2474

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
-- Performing Test COMPILER_RT_TARGET_HAS_UNAME - Success
-- Performing Test HAS_THREAD_LOCAL
-- Performing Test HAS_THREAD_LOCAL - Success
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;hwasan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;hwasan;msan;tsan;ubsan"
-- check-shadowcallstack does nothing.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/buildbot/buildbot-root/gcc-no-asserts/build/runtimes/runtimes-bins
317.781 [155/8/7115] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o
FAILED: unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o 
/opt/ccache/bin/g++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/gcc-no-asserts/build/unittests/Support -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/llvm/unittests/Support -I/home/buildbot/buildbot-root/gcc-no-asserts/build/include -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/llvm/include -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-dangling-else -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -std=c++17 -MD -MT unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o -MF unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o.d -o unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o -c /home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/llvm/unittests/Support/DebugLogTest.cpp
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/llvm/unittests/Support/DebugLogTest.cpp: In member function ‘virtual void DebugLogTest_Basic_Test::TestBody()’:
/home/buildbot/buildbot-root/gcc-no-asserts/llvm-project/llvm/unittests/Support/DebugLogTest.cpp:69:22: error: zero-size array ‘DT’
   69 |   static const char *DT[] = {};
      |                      ^~
319.101 [155/2/7121] Linking CXX executable unittests/Target/TargetMachineCTests
ninja: build stopped: subcommand failed.

@jpienaar
Copy link
Member Author

Working on fix

// is equivalent to
// LLVM_DEBUG(dbgs() << DEBUG_TYPE << " [" << __FILE__ << ":" << __LINE__
// << "] " << "Bitset contains: " << Bitset << "\n");
#define LDBG() DEBUGLOG_WITH_STREAM_AND_TYPE(llvm::dbgs(), DEBUG_TYPE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we prefix this with LLVM_? In the past, we used DEBUG instead of LLVM_DEBUG which caused naming collisions downstream: https://discourse.llvm.org/t/rfc-change-debug-macro-to-llvm-debug/48092 . I wonder if LDBG may be terse enough to run into similar issues.

@kuhar
Copy link
Member

kuhar commented Jul 25, 2025

@jpienaar this is great! Consider sending a PSA to discourse to advertise this.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 25, 2025

LLVM Buildbot has detected a new failure on builder clang-with-thin-lto-ubuntu running on as-worker-92 while building llvm at step 6 "build-stage1-compiler".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/127/builds/4191

Here is the relevant piece of the build log for the reference
Step 6 (build-stage1-compiler) failure: build (failure)
...
946.263 [249/72/6314] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/Base64Test.cpp.o
946.321 [248/72/6315] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DebugTest.cpp.o
946.380 [247/72/6316] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/CRCTest.cpp.o
946.441 [246/72/6317] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DebugCounterTest.cpp.o
946.451 [245/72/6318] Linking CXX executable unittests/MC/AMDGPU/AMDGPUMCTests
946.830 [244/72/6319] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/IntrinsicInstTest.cpp.o
947.104 [243/72/6320] Linking CXX executable unittests/ObjectYAML/ObjectYAMLTests
947.145 [242/72/6321] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/DXContainerTest.cpp.o
947.216 [241/72/6322] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/AddressRangeTest.cpp.o
947.263 [240/72/6323] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o
FAILED: unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o 
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/unittests/Support -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/unittests/Support -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-dangling-else -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -std=c++17 -MD -MT unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o -MF unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o.d -o unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o -c /home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/unittests/Support/DebugLogTest.cpp
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/unittests/Support/DebugLogTest.cpp: In member function ‘virtual void DebugLogTest_Basic_Test::TestBody()’:
/home/buildbot/as-worker-92/clang-with-thin-lto-ubuntu/llvm-project/llvm/unittests/Support/DebugLogTest.cpp:69:22: error: zero-size array ‘DT’
   69 |   static const char *DT[] = {};
      |                      ^~
947.360 [240/71/6324] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/OperatorTest.cpp.o
947.450 [240/70/6325] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/Caching.cpp.o
947.668 [240/69/6326] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/CSKYAttributeParserTest.cpp.o
947.752 [240/68/6327] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DJBTest.cpp.o
947.782 [240/67/6328] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/Chrono.cpp.o
947.831 [240/66/6329] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassManagerTest.cpp.o
947.958 [240/65/6330] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/PGOCtxProfReaderWriterTest.cpp.o
947.978 [240/64/6331] Building CXX object unittests/Passes/Plugins/DoublerPlugin/CMakeFiles/DoublerPlugin.dir/DoublerPlugin.cpp.o
948.128 [240/63/6332] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/Casting.cpp.o
948.133 [240/62/6333] Building CXX object unittests/Passes/Plugins/TestPlugin/CMakeFiles/TestPlugin.dir/TestPlugin.cpp.o
948.231 [240/61/6334] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DivisionByConstantTest.cpp.o
948.232 [240/60/6335] Building CXX object unittests/MI/CMakeFiles/MITests.dir/LiveIntervalTest.cpp.o
948.257 [240/59/6336] Building CXX object unittests/Option/CMakeFiles/OptionTests.dir/OptionParsingTest.cpp.o
948.264 [240/58/6337] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ErrnoTest.cpp.o
948.444 [240/57/6338] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VFABIDemanglerTest.cpp.o
948.648 [240/56/6339] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ELFAttributeParserTest.cpp.o
948.674 [240/55/6340] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/FSUniqueIDTest.cpp.o
948.691 [240/54/6341] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TypesTest.cpp.o
948.783 [240/53/6342] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ErrorOrTest.cpp.o
948.821 [240/52/6343] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/EndianStreamTest.cpp.o
948.852 [240/51/6344] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/EndianTest.cpp.o
948.997 [240/50/6345] Linking CXX executable unittests/CodeGen/CodeGenTests
949.021 [240/49/6346] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ExtensibleRTTITest.cpp.o
949.085 [240/48/6347] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/GenericDomTreeTest.cpp.o
949.156 [240/47/6348] Building CXX object unittests/MIR/CMakeFiles/MIRTests.dir/MachineMetadata.cpp.o
949.229 [240/46/6349] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ExponentialBackoffTest.cpp.o
949.382 [240/45/6350] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/IndexedAccessorTest.cpp.o
949.724 [240/44/6351] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/BalancedPartitioningTest.cpp.o
949.801 [240/43/6352] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/InstructionsTest.cpp.o
949.938 [240/42/6353] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/InterleavedRangeTest.cpp.o
949.982 [240/41/6354] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/InstructionCostTest.cpp.o
950.114 [240/40/6355] Building CXX object unittests/ExecutionEngine/Orc/CMakeFiles/OrcJITTests.dir/CoreAPIsTest.cpp.o
950.286 [240/39/6356] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/MD5Test.cpp.o

mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Jul 28, 2025
Add macro that mirror a common usage of logging to output .This makes it easy to have
streaming log like behavior while still using the base debug logging.

I also wanted to avoid inventing a full logging library here while enabling others to change the sink without too much pain, so put it in its own header (this also avoids making Debug depend on raw_ostream beyond forward reference). The should allow a consistent dev experience without fixing the sink too much.

---------

Co-authored-by: Mehdi Amini <[email protected]>
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 29, 2025

LLVM Buildbot has detected a new failure on builder clang-with-lto-ubuntu running on as-worker-91 while building llvm at step 6 "build-stage1-compiler".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/49/builds/1938

Here is the relevant piece of the build log for the reference
Step 6 (build-stage1-compiler) failure: build (failure)
...
970.234 [251/72/6312] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DebugTest.cpp.o
970.252 [250/72/6313] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/XCOFFObjectFileTest.cpp.o
970.347 [249/72/6314] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/CheckedArithmeticTest.cpp.o
970.360 [248/72/6315] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/IntrinsicInstTest.cpp.o
970.419 [247/72/6316] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/ValueMapTest.cpp.o
970.563 [246/72/6317] Building CXX object unittests/Object/CMakeFiles/ObjectTests.dir/DXContainerTest.cpp.o
970.567 [245/72/6318] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/CRCTest.cpp.o
970.758 [244/72/6319] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/BranchProbabilityTest.cpp.o
970.828 [243/72/6320] Building CXX object unittests/MI/CMakeFiles/MITests.dir/LiveIntervalTest.cpp.o
971.247 [242/72/6321] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o
FAILED: unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o 
/usr/bin/c++ -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/unittests/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/unittests/Support -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/build/stage1/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/third-party/unittest/googletest/include -I/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-dangling-else -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -Wno-suggest-override -std=c++17 -MD -MT unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o -MF unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o.d -o unittests/Support/CMakeFiles/SupportTests.dir/DebugLogTest.cpp.o -c /home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/unittests/Support/DebugLogTest.cpp
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/unittests/Support/DebugLogTest.cpp: In member function ‘virtual void DebugLogTest_Basic_Test::TestBody()’:
/home/buildbot/as-worker-91/clang-with-lto-ubuntu/llvm-project/llvm/unittests/Support/DebugLogTest.cpp:69:22: error: zero-size array ‘DT’
   69 |   static const char *DT[] = {};
      |                      ^~
971.249 [242/71/6322] Linking CXX executable unittests/ObjectYAML/ObjectYAMLTests
971.405 [242/70/6323] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DJBTest.cpp.o
971.641 [242/69/6324] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/PGOCtxProfReaderWriterTest.cpp.o
971.651 [242/68/6325] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/AddressRangeTest.cpp.o
971.677 [242/67/6326] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/CSKYAttributeParserTest.cpp.o
971.751 [242/66/6327] Building CXX object unittests/Passes/Plugins/TestPlugin/CMakeFiles/TestPlugin.dir/TestPlugin.cpp.o
971.758 [242/65/6328] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/Casting.cpp.o
971.793 [242/64/6329] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ErrnoTest.cpp.o
971.794 [242/63/6330] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/DivisionByConstantTest.cpp.o
971.904 [242/62/6331] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/Chrono.cpp.o
972.068 [242/61/6332] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/Caching.cpp.o
972.129 [242/60/6333] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/OperatorTest.cpp.o
972.225 [242/59/6334] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ELFAttributeParserTest.cpp.o
972.279 [242/58/6335] Building CXX object unittests/ExecutionEngine/Orc/CMakeFiles/OrcJITTests.dir/CoreAPIsTest.cpp.o
972.301 [242/57/6336] Building CXX object unittests/Passes/Plugins/DoublerPlugin/CMakeFiles/DoublerPlugin.dir/DoublerPlugin.cpp.o
972.538 [242/56/6337] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/EndianStreamTest.cpp.o
972.639 [242/55/6338] Building CXX object unittests/Option/CMakeFiles/OptionTests.dir/OptionParsingTest.cpp.o
972.711 [242/54/6339] Building CXX object unittests/MIR/CMakeFiles/MIRTests.dir/MachineMetadata.cpp.o
972.730 [242/53/6340] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/PassManagerTest.cpp.o
972.785 [242/52/6341] Building CXX object unittests/SandboxIR/CMakeFiles/SandboxIRTests.dir/TypesTest.cpp.o
972.798 [242/51/6342] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/VFABIDemanglerTest.cpp.o
972.818 [242/50/6343] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ErrorOrTest.cpp.o
972.859 [242/49/6344] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ExtensibleRTTITest.cpp.o
972.902 [242/48/6345] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/GenericDomTreeTest.cpp.o
972.967 [242/47/6346] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/FSUniqueIDTest.cpp.o
973.071 [242/46/6347] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ExponentialBackoffTest.cpp.o
973.187 [242/45/6348] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/EndianTest.cpp.o
973.373 [242/44/6349] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/BalancedPartitioningTest.cpp.o
973.438 [242/43/6350] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/FileOutputBufferTest.cpp.o
973.833 [242/42/6351] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/IndexedAccessorTest.cpp.o
973.966 [242/41/6352] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/InterleavedRangeTest.cpp.o
974.057 [242/40/6353] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/LineIteratorTest.cpp.o
974.342 [242/39/6354] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/InstructionCostTest.cpp.o

Yu-Zhewen added a commit to iree-org/iree that referenced this pull request Oct 29, 2025
This change removes IREE’s local LDBG macro definition in favor of the
LLVM-provided version introduced in
llvm/llvm-project#143704.

This update is also in preparation for
llvm/llvm-project#165429, which would otherwise
cause a macro redefinition error due to the existing local LDBG
definition.

Signed-off-by: Yu-Zhewen <[email protected]>
bangtianliu pushed a commit to bangtianliu/iree that referenced this pull request Oct 30, 2025
…22456)

This change removes IREE’s local LDBG macro definition in favor of the
LLVM-provided version introduced in
llvm/llvm-project#143704.

This update is also in preparation for
llvm/llvm-project#165429, which would otherwise
cause a macro redefinition error due to the existing local LDBG
definition.

Signed-off-by: Yu-Zhewen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants