[llvm] [llvm][support] Add LDBG macro. (PR #143704)

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 24 11:09:47 PDT 2025


================
@@ -0,0 +1,55 @@
+//===- 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
----------------
joker-eph wrote:

Can we have a test in the `#else` that tests the release behavior?


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


More information about the llvm-commits mailing list