diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-14 23:37:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-14 23:37:22 +0000 |
commit | d924edb845101f89744344aee66bbf9f2e89c3c6 (patch) | |
tree | 2913ca8f2448c9830a383b0486fe595f6987cc61 /include | |
parent | 83bb3d2f4e4556dc70b97ae9726d1fc42ed6e765 (diff) | |
download | external_llvm-d924edb845101f89744344aee66bbf9f2e89c3c6.zip external_llvm-d924edb845101f89744344aee66bbf9f2e89c3c6.tar.gz external_llvm-d924edb845101f89744344aee66bbf9f2e89c3c6.tar.bz2 |
add support for -- for symmetry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10865 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/Support/Statistic.h | 2 | ||||
-rw-r--r-- | include/llvm/ADT/Statistic.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/Support/Statistic.h b/include/Support/Statistic.h index 4e592d5..9da645b 100644 --- a/include/Support/Statistic.h +++ b/include/Support/Statistic.h @@ -76,6 +76,8 @@ public: const Statistic &operator=(DataType Val) { Value = Val; return *this; } const Statistic &operator++() { ++Value; return *this; } DataType operator++(int) { return Value++; } + const Statistic &operator--() { --Value; return *this; } + DataType operator--(int) { return Value--; } const Statistic &operator+=(const DataType &V) { Value += V; return *this; } const Statistic &operator-=(const DataType &V) { Value -= V; return *this; } }; diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h index 4e592d5..9da645b 100644 --- a/include/llvm/ADT/Statistic.h +++ b/include/llvm/ADT/Statistic.h @@ -76,6 +76,8 @@ public: const Statistic &operator=(DataType Val) { Value = Val; return *this; } const Statistic &operator++() { ++Value; return *this; } DataType operator++(int) { return Value++; } + const Statistic &operator--() { --Value; return *this; } + DataType operator--(int) { return Value--; } const Statistic &operator+=(const DataType &V) { Value += V; return *this; } const Statistic &operator-=(const DataType &V) { Value -= V; return *this; } }; |