add support for -- for symmetry
authorChris Lattner <sabre@nondot.org>
Wed, 14 Jan 2004 23:37:22 +0000 (23:37 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Jan 2004 23:37:22 +0000 (23:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10865 91177308-0d34-0410-b5e6-96231b3b80d8

include/Support/Statistic.h
include/llvm/ADT/Statistic.h

index 4e592d5832f8cffb424a0186634362847dd31a6f..9da645ba4e519958ebcc8962f049ab6a81f15d44 100644 (file)
@@ -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; }
 };
index 4e592d5832f8cffb424a0186634362847dd31a6f..9da645ba4e519958ebcc8962f049ab6a81f15d44 100644 (file)
@@ -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; }
 };