From fcb2062d4f3f0af9cfa797e7cc9d97a27aa41edf Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 5 Jun 2025 18:30:09 -0700 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q?itial=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.4 --- llvm/lib/Support/DebugCounter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp index 9c4a4429ca0ee..1fbd700afa1d7 100644 --- a/llvm/lib/Support/DebugCounter.cpp +++ b/llvm/lib/Support/DebugCounter.cpp @@ -172,6 +172,11 @@ DebugCounter &DebugCounter::instance() { void DebugCounter::push_back(const std::string &Val) { if (Val.empty()) return; +#ifdef NDEBUG + // isCountingEnabled is hardcoded to false in NDEBUG. + errs() << "Requested --debug-counter in non-debug LLVM build. This is a " + "no-op.\n"; +#endif // The strings should come in as counter=chunk_list auto CounterPair = StringRef(Val).split('='); From d67c37f75b85bee74a2a395797d836836ea27e29 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 6 Jun 2025 09:51:18 -0700 Subject: [PATCH 2/4] Update llvm/lib/Support/DebugCounter.cpp Co-authored-by: Nikita Popov --- llvm/lib/Support/DebugCounter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp index 1fbd700afa1d7..41776db630077 100644 --- a/llvm/lib/Support/DebugCounter.cpp +++ b/llvm/lib/Support/DebugCounter.cpp @@ -174,7 +174,7 @@ void DebugCounter::push_back(const std::string &Val) { return; #ifdef NDEBUG // isCountingEnabled is hardcoded to false in NDEBUG. - errs() << "Requested --debug-counter in non-debug LLVM build. This is a " + errs() << "Requested --debug-counter in LLVM build without assertions. This is a " "no-op.\n"; #endif From 510e42ffa600b8a60b64bf18afe4d58c84e5fab9 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 6 Jun 2025 10:04:38 -0700 Subject: [PATCH 3/4] fmt Created using spr 1.3.4 --- llvm/lib/Support/DebugCounter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp index 41776db630077..9eaa8a6798e07 100644 --- a/llvm/lib/Support/DebugCounter.cpp +++ b/llvm/lib/Support/DebugCounter.cpp @@ -174,7 +174,8 @@ void DebugCounter::push_back(const std::string &Val) { return; #ifdef NDEBUG // isCountingEnabled is hardcoded to false in NDEBUG. - errs() << "Requested --debug-counter in LLVM build without assertions. This is a " + errs() << "Requested --debug-counter in LLVM build without assertions. This " + "is a " "no-op.\n"; #endif From 0dfd91466f1654f009b184687870440a20b28488 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Fri, 6 Jun 2025 10:05:44 -0700 Subject: [PATCH 4/4] fmt2 Created using spr 1.3.4 --- llvm/lib/Support/DebugCounter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp index 9eaa8a6798e07..6b65720440f30 100644 --- a/llvm/lib/Support/DebugCounter.cpp +++ b/llvm/lib/Support/DebugCounter.cpp @@ -175,8 +175,7 @@ void DebugCounter::push_back(const std::string &Val) { #ifdef NDEBUG // isCountingEnabled is hardcoded to false in NDEBUG. errs() << "Requested --debug-counter in LLVM build without assertions. This " - "is a " - "no-op.\n"; + "is a no-op.\n"; #endif // The strings should come in as counter=chunk_list