switch statistics over to not use static ctors.
authorChris Lattner <sabre@nondot.org>
Tue, 19 Dec 2006 23:16:47 +0000 (23:16 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 19 Dec 2006 23:16:47 +0000 (23:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32709 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Writer/Writer.cpp
lib/Transforms/IPO/SimplifyLibCalls.cpp

index c6bc22e796738afd199ed2c4654597f7c4e0610d..44a654bc5b7abe718f1126d2bb0f5cf5865bb056 100644 (file)
@@ -17,6 +17,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#define DEBUG_TYPE "bytecodewriter"
 #include "WriterInternals.h"
 #include "llvm/Bytecode/WriteBytecodePass.h"
 #include "llvm/CallingConv.h"
@@ -45,8 +46,7 @@ const unsigned BCVersionNum = 7;
 
 static RegisterPass<WriteBytecodePass> X("emitbytecode", "Bytecode Writer");
 
-static Statistic
-BytesWritten("bytecodewriter", "Number of bytecode bytes written");
+STATISTIC(BytesWritten, "Number of bytecode bytes written");
 
 //===----------------------------------------------------------------------===//
 //===                           Output Primitives                          ===//
index 08ae1994a6ef369013e3ed20adb53a80d04cbdc7..bbe020ce1e9bc0f6f3b55675bf5e4a1911332316 100644 (file)
@@ -73,11 +73,11 @@ public:
   /// optimized by the subclass.
   /// @brief Constructor that registers the optimization.
   LibCallOptimization(const char *FName, const char *Description)
-    : FunctionName(FName)
+    : FunctionName(FName) {
+      
 #ifndef NDEBUG
-    , occurrences("simplify-libcalls", Description)
+    occurrences.construct("simplify-libcalls", Description);
 #endif
-  {
     // Register this optimizer in the list of optimizations.
     Next = OptList;
     OptList = this;