aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Support/Statistic.h2
-rw-r--r--include/llvm/ADT/Statistic.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/Support/Statistic.h b/include/Support/Statistic.h
index 4e592d5832..9da645ba4e 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 4e592d5832..9da645ba4e 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; }
};