summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-12-19 23:16:47 +0000
committerChris Lattner <sabre@nondot.org>2006-12-19 23:16:47 +0000
commit1c560adfd1be8051644d7aefd32f2dcdb4070689 (patch)
tree112a5a3920505a5f465871da703894b761030f7f /lib
parent89e211e628db2424df72436d04d27ce1d24d6ad7 (diff)
downloadllvm-1c560adfd1be8051644d7aefd32f2dcdb4070689.tar.gz
llvm-1c560adfd1be8051644d7aefd32f2dcdb4070689.tar.bz2
llvm-1c560adfd1be8051644d7aefd32f2dcdb4070689.tar.xz
switch statistics over to not use static ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Bytecode/Writer/Writer.cpp4
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index c6bc22e796..44a654bc5b 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -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 ===//
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index 08ae1994a6..bbe020ce1e 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -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;