[llvm-commits] CVS: llvm/include/Support/Statistic.h

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 30 20:51:01 PST 2002


Changes in directory llvm/include/Support:

Statistic.h updated: 1.4 -> 1.5

---
Log message:

Statistic class should return const reference to *this, not a reference to 
the data type.


---
Diffs of the changes:

Index: llvm/include/Support/Statistic.h
diff -u llvm/include/Support/Statistic.h:1.4 llvm/include/Support/Statistic.h:1.5
--- llvm/include/Support/Statistic.h:1.4	Tue Oct  1 17:35:42 2002
+++ llvm/include/Support/Statistic.h	Wed Oct 30 20:50:27 2002
@@ -84,12 +84,12 @@
   ~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





More information about the llvm-commits mailing list