[PATCH] D29998: Add initial support for debug counting
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 17 15:28:21 PST 2017
davide requested changes to this revision.
davide added inline comments.
This revision now requires changes to proceed.
================
Comment at: include/llvm/Support/DebugCounter.h:70-71
+// Compile to nothing when debugging is off
+#ifdef NDEBUG
+ return true;
+#else
----------------
Add a diagnostic? ("enable debug if you want counters!") or something?
================
Comment at: include/llvm/Support/DebugCounter.h:79-80
+ // is non-zero
+ if (CounterPair.first < 0)
+ return true;
+ if (CounterPair.first != 0) {
----------------
Can counter ever go below zero?
================
Comment at: lib/Support/DebugCounter.cpp:72-74
+ } else {
+ // FIXME: Issue warning?
+ }
----------------
At least can we output something to stderr, here, I think
https://reviews.llvm.org/D29998
More information about the llvm-commits
mailing list