X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FInstCount.cpp;h=3b385d26ba3c07245a6cdfcce01b18ac86a167ee;hb=009da05e750b7bac7e1902fcdc85394de4ea63b3;hp=a4b041f02a3abc09904ed6b152b6ea62fedef6c2;hpb=046e78ce55a7c3d82b7b6758d2d77f2d99f970bf;p=oota-llvm.git diff --git a/lib/Analysis/InstCount.cpp b/lib/Analysis/InstCount.cpp index a4b041f02a3..3b385d26ba3 100644 --- a/lib/Analysis/InstCount.cpp +++ b/lib/Analysis/InstCount.cpp @@ -15,6 +15,7 @@ #include "llvm/Analysis/Passes.h" #include "llvm/Pass.h" #include "llvm/Function.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/raw_ostream.h" @@ -50,7 +51,9 @@ namespace { } public: static char ID; // Pass identification, replacement for typeid - InstCount() : FunctionPass(&ID) {} + InstCount() : FunctionPass(ID) { + initializeInstCountPass(*PassRegistry::getPassRegistry()); + } virtual bool runOnFunction(Function &F); @@ -63,8 +66,8 @@ namespace { } char InstCount::ID = 0; -static RegisterPass -X("instcount", "Counts the various types of Instructions", false, true); +INITIALIZE_PASS(InstCount, "instcount", + "Counts the various types of Instructions", false, true) FunctionPass *llvm::createInstCountPass() { return new InstCount(); }