[llvm-commits] CVS: llvm/lib/Support/Statistic.cpp Timer.cpp

Chris Lattner sabre at nondot.org
Wed Dec 6 09:47:27 PST 2006



Changes in directory llvm/lib/Support:

Statistic.cpp updated: 1.18 -> 1.19
Timer.cpp updated: 1.46 -> 1.47
---
Log message:

Detemplatize the Statistic class.  The only type it is instantiated with
is 'unsigned'.



---
Diffs of the changes:  (+2 -4)

 Statistic.cpp |    4 +---
 Timer.cpp     |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)


Index: llvm/lib/Support/Statistic.cpp
diff -u llvm/lib/Support/Statistic.cpp:1.18 llvm/lib/Support/Statistic.cpp:1.19
--- llvm/lib/Support/Statistic.cpp:1.18	Tue Aug 29 23:17:00 2006
+++ llvm/lib/Support/Statistic.cpp	Wed Dec  6 11:46:32 2006
@@ -15,7 +15,7 @@
 // This is useful for reporting information like the number of instructions
 // simplified, optimized or removed by various transformations, like this:
 //
-// static Statistic<> NumInstEliminated("GCSE - Number of instructions killed");
+// static Statistic NumInstEliminated("GCSE - Number of instructions killed");
 //
 // Later, in the code: ++NumInstEliminated;
 //
@@ -33,8 +33,6 @@
 
 unsigned StatisticBase::NumStats = 0;
 
-TEMPLATE_INSTANTIATION(class Statistic<unsigned>);
-
 // -stats - Command line option to cause transformations to emit stats about
 // what they did.
 //


Index: llvm/lib/Support/Timer.cpp
diff -u llvm/lib/Support/Timer.cpp:1.46 llvm/lib/Support/Timer.cpp:1.47
--- llvm/lib/Support/Timer.cpp:1.46	Wed Oct  4 16:50:14 2006
+++ llvm/lib/Support/Timer.cpp	Wed Dec  6 11:46:32 2006
@@ -27,7 +27,7 @@
 
 // getLibSupportInfoOutputFilename - This ugly hack is brought to you courtesy
 // of constructor/destructor ordering being unspecified by C++.  Basically the
-// problem is that a Statistic<> object gets destroyed, which ends up calling
+// problem is that a Statistic object gets destroyed, which ends up calling
 // 'GetLibSupportInfoOutputFile()' (below), which calls this function.
 // LibSupportInfoOutputFilename used to be a global variable, but sometimes it
 // would get destroyed before the Statistic, causing havoc to ensue.  We "fix"






More information about the llvm-commits mailing list