From: Daniel Berlin Date: Sat, 4 Mar 2017 14:08:47 +0000 (+0000) Subject: DebugCounter: Initialize skip to 0, not -1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=392cb33de19dc9a53124a46ac03d61e5f186f6ca;p=llvm DebugCounter: Initialize skip to 0, not -1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296971 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/DebugCounter.cpp b/lib/Support/DebugCounter.cpp index a74685287da..29dae8a20f0 100644 --- a/lib/Support/DebugCounter.cpp +++ b/lib/Support/DebugCounter.cpp @@ -81,7 +81,7 @@ void DebugCounter::push_back(const std::string &Val) { 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::string &Val) { 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