llvm.org GIT mirror llvm / b35e4e8
whitespace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141572 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Trick 8 years ago
1 changed file(s) with 8 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
5353 Value = Val;
5454 return init();
5555 }
56
56
5757 const Statistic &operator++() {
5858 // FIXME: This function and all those that follow carefully use an
5959 // atomic operation to update the value safely in the presence of
6262 sys::AtomicIncrement(&Value);
6363 return init();
6464 }
65
65
6666 unsigned operator++(int) {
6767 init();
6868 unsigned OldValue = Value;
6969 sys::AtomicIncrement(&Value);
7070 return OldValue;
7171 }
72
72
7373 const Statistic &operator--() {
7474 sys::AtomicDecrement(&Value);
7575 return init();
7676 }
77
77
7878 unsigned operator--(int) {
7979 init();
8080 unsigned OldValue = Value;
8181 sys::AtomicDecrement(&Value);
8282 return OldValue;
8383 }
84
84
8585 const Statistic &operator+=(const unsigned &V) {
8686 sys::AtomicAdd(&Value, V);
8787 return init();
8888 }
89
89
9090 const Statistic &operator-=(const unsigned &V) {
9191 sys::AtomicAdd(&Value, -V);
9292 return init();
9393 }
94
94
9595 const Statistic &operator*=(const unsigned &V) {
9696 sys::AtomicMul(&Value, V);
9797 return init();
9898 }
99
99
100100 const Statistic &operator/=(const unsigned &V) {
101101 sys::AtomicDiv(&Value, V);
102102 return init();