From d924edb845101f89744344aee66bbf9f2e89c3c6 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 14 Jan 2004 23:37:22 +0000 Subject: [PATCH] add support for -- for symmetry git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10865 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/Support/Statistic.h | 2 ++ include/llvm/ADT/Statistic.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/include/Support/Statistic.h b/include/Support/Statistic.h index 4e592d5832f..9da645ba4e5 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 4e592d5832f..9da645ba4e5 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; } };