llvm.org GIT mirror llvm / 4932b31
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 Chris Lattner 17 years ago
2 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
8383 ~Statistic() { destroy(); }
8484
8585 // Allow use of this class as the value itself...
86 inline operator DataType() const { return Value; }
87 inline const DataType &operator=(DataType Val) { Value = Val; return Value; }
88 inline const DataType &operator++() { return ++Value; }
89 inline DataType operator++(int) { return Value++; }
90 inline const DataType &operator+=(const DataType &V) { return Value += V; }
91 inline const DataType &operator-=(const DataType &V) { return Value -= V; }
86 operator DataType() const { return Value; }
87 const Statistic &operator=(DataType Val) { Value = Val; return *this; }
88 const Statistic &operator++() { ++Value; return *this; }
89 DataType operator++(int) { return Value++; }
90 const Statistic &operator+=(const DataType &V) { Value += V; return *this; }
91 const Statistic &operator-=(const DataType &V) { Value -= V; return *this; }
9292 };
9393
9494 #endif
8383 ~Statistic() { destroy(); }
8484
8585 // Allow use of this class as the value itself...
86 inline operator DataType() const { return Value; }
87 inline const DataType &operator=(DataType Val) { Value = Val; return Value; }
88 inline const DataType &operator++() { return ++Value; }
89 inline DataType operator++(int) { return Value++; }
90 inline const DataType &operator+=(const DataType &V) { return Value += V; }
91 inline const DataType &operator-=(const DataType &V) { return Value -= V; }
86 operator DataType() const { return Value; }
87 const Statistic &operator=(DataType Val) { Value = Val; return *this; }
88 const Statistic &operator++() { ++Value; return *this; }
89 DataType operator++(int) { return Value++; }
90 const Statistic &operator+=(const DataType &V) { Value += V; return *this; }
91 const Statistic &operator-=(const DataType &V) { Value -= V; return *this; }
9292 };
9393
9494 #endif