mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-13 21:10:39 +00:00
[DebugCounters] don't do redundant map lookups; NFC
llvm-svn: 340104
This commit is contained in:
parent
6bc29dcd94
commit
c29b0fbcdc
@ -83,8 +83,10 @@ void DebugCounter::push_back(const std::string &Val) {
|
||||
return;
|
||||
}
|
||||
enableAllCounters();
|
||||
Counters[CounterID].Skip = CounterVal;
|
||||
Counters[CounterID].IsSet = true;
|
||||
|
||||
CounterInfo &Counter = Counters[CounterID];
|
||||
Counter.Skip = CounterVal;
|
||||
Counter.IsSet = true;
|
||||
} else if (CounterPair.first.endswith("-count")) {
|
||||
auto CounterName = CounterPair.first.drop_back(6);
|
||||
unsigned CounterID = getCounterId(CounterName);
|
||||
@ -94,8 +96,10 @@ void DebugCounter::push_back(const std::string &Val) {
|
||||
return;
|
||||
}
|
||||
enableAllCounters();
|
||||
Counters[CounterID].StopAfter = CounterVal;
|
||||
Counters[CounterID].IsSet = true;
|
||||
|
||||
CounterInfo &Counter = Counters[CounterID];
|
||||
Counter.StopAfter = CounterVal;
|
||||
Counter.IsSet = true;
|
||||
} else {
|
||||
errs() << "DebugCounter Error: " << CounterPair.first
|
||||
<< " does not end with -skip or -count\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user