mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Allow stat += 0 without activating the stat.
For me, this is a nice convenience. We generally want grep to match stats output only when the event has occurred. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141574 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b35e4e8472
commit
8cc4769108
@ -84,11 +84,13 @@ public:
|
||||
}
|
||||
|
||||
const Statistic &operator+=(const unsigned &V) {
|
||||
if (!V) return *this;
|
||||
sys::AtomicAdd(&Value, V);
|
||||
return init();
|
||||
}
|
||||
|
||||
const Statistic &operator-=(const unsigned &V) {
|
||||
if (!V) return *this;
|
||||
sys::AtomicAdd(&Value, -V);
|
||||
return init();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user