[llvm] r296971 - DebugCounter: Initialize skip to 0, not -1
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 4 06:08:48 PST 2017
Author: dannyb
Date: Sat Mar 4 08:08:47 2017
New Revision: 296971
URL: http://llvm.org/viewvc/llvm-project?rev=296971&view=rev
Log:
DebugCounter: Initialize skip to 0, not -1
Modified:
llvm/trunk/lib/Support/DebugCounter.cpp
Modified: llvm/trunk/lib/Support/DebugCounter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/DebugCounter.cpp?rev=296971&r1=296970&r2=296971&view=diff
==============================================================================
--- llvm/trunk/lib/Support/DebugCounter.cpp (original)
+++ llvm/trunk/lib/Support/DebugCounter.cpp Sat Mar 4 08:08:47 2017
@@ -81,7 +81,7 @@ void DebugCounter::push_back(const std::
return;
}
- auto Res = Counters.insert({CounterID, {-1, -1}});
+ auto Res = Counters.insert({CounterID, {0, -1}});
Res.first->second.first = CounterVal;
} else if (CounterPair.first.endswith("-count")) {
auto CounterName = CounterPair.first.drop_back(6);
@@ -92,7 +92,7 @@ void DebugCounter::push_back(const std::
return;
}
- auto Res = Counters.insert({CounterID, {-1, -1}});
+ auto Res = Counters.insert({CounterID, {0, -1}});
Res.first->second.second = CounterVal;
} else {
errs() << "DebugCounter Error: " << CounterPair.first
More information about the llvm-commits
mailing list