From f0236fd49009d34c814ab30348ce6278c51056a7 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Sat, 4 Mar 2017 14:08:47 +0000 Subject: DebugCounter: Initialize skip to 0, not -1 llvm-svn: 296971 --- llvm/lib/Support/DebugCounter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Support') diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp index a74685287da..29dae8a20f0 100644 --- a/llvm/lib/Support/DebugCounter.cpp +++ b/llvm/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 -- cgit v1.2.3