[llvm] [NFC] [DebugCounter] warn if --debug-counter is unused in NDEBUG (PR #143057)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 01:29:32 PDT 2025
================
@@ -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 "
----------------
nikic wrote:
```suggestion
errs() << "Requested --debug-counter in LLVM build without assertions. This is a "
```
https://github.com/llvm/llvm-project/pull/143057
More information about the llvm-commits
mailing list