[llvm] [llvm][support] Fix DebugLogTest. (PR #150585)
Jacques Pienaar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 25 01:03:03 PDT 2025
https://github.com/jpienaar created https://github.com/llvm/llvm-project/pull/150585
Fails on windows with error
C2466: cannot allocate an array of constant size 0
else.
>From b05453bf665af889de17aa1c9c9a9481c5c2504c Mon Sep 17 00:00:00 2001
From: Jacques Pienaar <jacques+gh at japienaar.info>
Date: Fri, 25 Jul 2025 08:01:26 +0000
Subject: [PATCH] [llvm][support] Fix DebugLogTest.
Fails on windows with error
C2466: cannot allocate an array of constant size 0
else.
---
llvm/unittests/Support/DebugLogTest.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/unittests/Support/DebugLogTest.cpp b/llvm/unittests/Support/DebugLogTest.cpp
index 513699913f922..22dffd857613d 100644
--- a/llvm/unittests/Support/DebugLogTest.cpp
+++ b/llvm/unittests/Support/DebugLogTest.cpp
@@ -66,7 +66,7 @@ TEST(DebugLogTest, Basic) {
// LDBG should be compiled out in NDEBUG, so just check it compiles and has
// no effect.
llvm::DebugFlag = true;
- static const char *DT[] = {};
+ static const char *DT[] = {"A"};
setCurrentDebugTypes(DT, 0);
int count = 0;
auto inc = [&]() { return ++count; };
More information about the llvm-commits
mailing list