summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/DebugCounter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/DebugCounter.cpp')
-rw-r--r--llvm/lib/Support/DebugCounter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp
index 5a9cecfc56d..9c12de0776a 100644
--- a/llvm/lib/Support/DebugCounter.cpp
+++ b/llvm/lib/Support/DebugCounter.cpp
@@ -82,6 +82,7 @@ void DebugCounter::push_back(const std::string &Val) {
<< " is not a registered counter\n";
return;
}
+ enableAllCounters();
Counters[CounterID].Skip = CounterVal;
Counters[CounterID].IsSet = true;
} else if (CounterPair.first.endswith("-count")) {
@@ -92,6 +93,7 @@ void DebugCounter::push_back(const std::string &Val) {
<< " is not a registered counter\n";
return;
}
+ enableAllCounters();
Counters[CounterID].StopAfter = CounterVal;
Counters[CounterID].IsSet = true;
} else {
OpenPOWER on IntegriCloud