diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-31 02:50:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-31 02:50:27 +0000 |
commit | 4932b31dce8fc065a91af2852314ee8c4403ee23 (patch) | |
tree | 82599e38329d492193785588d99971dc9c9553cd /include | |
parent | 6918c079a1393be8ae551d699479fbfa39b99277 (diff) | |
download | llvm-4932b31dce8fc065a91af2852314ee8c4403ee23.tar.gz llvm-4932b31dce8fc065a91af2852314ee8c4403ee23.tar.bz2 llvm-4932b31dce8fc065a91af2852314ee8c4403ee23.tar.xz |
Statistic class should return const reference to *this, not a reference to
the data type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/Support/Statistic.h | 12 | ||||
-rw-r--r-- | include/llvm/ADT/Statistic.h | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/include/Support/Statistic.h b/include/Support/Statistic.h index 62dec92bc4..fbdb0ba063 100644 --- a/include/Support/Statistic.h +++ b/include/Support/Statistic.h @@ -84,12 +84,12 @@ public: ~Statistic() { destroy(); } // Allow use of this class as the value itself... - inline operator DataType() const { return Value; } - inline const DataType &operator=(DataType Val) { Value = Val; return Value; } - inline const DataType &operator++() { return ++Value; } - inline DataType operator++(int) { return Value++; } - inline const DataType &operator+=(const DataType &V) { return Value += V; } - inline const DataType &operator-=(const DataType &V) { return Value -= V; } + operator DataType() const { return Value; } + const Statistic &operator=(DataType Val) { Value = Val; return *this; } + 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; } }; #endif diff --git a/include/llvm/ADT/Statistic.h b/include/llvm/ADT/Statistic.h index 62dec92bc4..fbdb0ba063 100644 --- a/include/llvm/ADT/Statistic.h +++ b/include/llvm/ADT/Statistic.h @@ -84,12 +84,12 @@ public: ~Statistic() { destroy(); } // Allow use of this class as the value itself... - inline operator DataType() const { return Value; } - inline const DataType &operator=(DataType Val) { Value = Val; return Value; } - inline const DataType &operator++() { return ++Value; } - inline DataType operator++(int) { return Value++; } - inline const DataType &operator+=(const DataType &V) { return Value += V; } - inline const DataType &operator-=(const DataType &V) { return Value -= V; } + operator DataType() const { return Value; } + const Statistic &operator=(DataType Val) { Value = Val; return *this; } + 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; } }; #endif |