[llvm] Introduce LDBG_OS() macro as a variant of LDBG() (PR #157194)
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 03:45:44 PDT 2025
================
@@ -128,6 +128,131 @@ TEST(DebugLogTest, DestructorPrefix) {
// After destructors, nothing should have been printed.
EXPECT_EQ(os.str(), "");
}
+
+TEST(DebugLogTest, LDBG_MACROS) {
+ llvm::DebugFlag = true;
+ static const char *DT[] = {"A:3", "B:2"};
+ setCurrentDebugTypes(DT, sizeof(DT) / sizeof(DT[0]));
+ std::string Str;
+ raw_string_ostream DebugOs(Str);
+ std::string StrRef;
----------------
joker-eph wrote:
Indeed, it is meant as "reference" but I can how that's confusing with "StringRef"!
https://github.com/llvm/llvm-project/pull/157194
More information about the llvm-commits
mailing list