'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
index 7b5def4..85339bf 100644
--- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -75,7 +75,7 @@
                               "Promote 'by reference' arguments to scalars");
 }
 
-Pass *llvm::createArgumentPromotionPass() {
+ModulePass *llvm::createArgumentPromotionPass() {
   return new ArgPromotion();
 }
 
diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
index 9f3c1095..27e1955 100644
--- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
@@ -26,19 +26,19 @@
 namespace {
   Statistic<> NumMerged("constmerge", "Number of global constants merged");
 
-  struct ConstantMerge : public Pass {
+  struct ConstantMerge : public ModulePass {
     // run - For this pass, process all of the globals in the module,
     // eliminating duplicate constants.
     //
-    bool run(Module &M);
+    bool runOnModule(Module &M);
   };
 
   RegisterOpt<ConstantMerge> X("constmerge","Merge Duplicate Global Constants");
 }
 
-Pass *llvm::createConstantMergePass() { return new ConstantMerge(); }
+ModulePass *llvm::createConstantMergePass() { return new ConstantMerge(); }
 
-bool ConstantMerge::run(Module &M) {
+bool ConstantMerge::runOnModule(Module &M) {
   std::map<Constant*, GlobalVariable*> CMap;
 
   // Replacements - This vector contains a list of replacements to perform.
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
index cde186c..e4b7a3e 100644
--- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -38,7 +38,7 @@
 
   /// DAE - The dead argument elimination pass.
   ///
-  class DAE : public Pass {
+  class DAE : public ModulePass {
     /// Liveness enum - During our initial pass over the program, we determine
     /// that things are either definately alive, definately dead, or in need of
     /// interprocedural analysis (MaybeLive).
@@ -75,7 +75,7 @@
     std::multimap<Function*, CallSite> CallSites;
 
   public:
-    bool run(Module &M);
+    bool runOnModule(Module &M);
 
     virtual bool ShouldHackArguments() const { return false; }
 
@@ -106,8 +106,8 @@
 /// createDeadArgEliminationPass - This pass removes arguments from functions
 /// which are not used by the body of the function.
 ///
-Pass *llvm::createDeadArgEliminationPass() { return new DAE(); }
-Pass *llvm::createDeadArgHackingPass() { return new DAH(); }
+ModulePass *llvm::createDeadArgEliminationPass() { return new DAE(); }
+ModulePass *llvm::createDeadArgHackingPass() { return new DAH(); }
 
 static inline bool CallPassesValueThoughVararg(Instruction *Call,
                                                const Value *Arg) {
@@ -484,7 +484,7 @@
   F->getParent()->getFunctionList().erase(F);
 }
 
-bool DAE::run(Module &M) {
+bool DAE::runOnModule(Module &M) {
   // First phase: loop through the module, determining which arguments are live.
   // We assume all arguments are dead unless proven otherwise (allowing us to
   // determine that dead arguments passed into recursive functions are dead).
diff --git a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp b/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
index e2d475d..9b1a919 100644
--- a/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/llvm/lib/Transforms/IPO/DeadTypeElimination.cpp
@@ -21,14 +21,14 @@
 using namespace llvm;
 
 namespace {
-  struct DTE : public Pass {
+  struct DTE : public ModulePass {
     // doPassInitialization - For this pass, it removes global symbol table
     // entries for primitive types.  These are never used for linking in GCC and
     // they make the output uglier to look at, so we nuke them.
     //
     // Also, initialize instance variables.
     //
-    bool run(Module &M);
+    bool runOnModule(Module &M);
 
     // getAnalysisUsage - This function needs FindUsedTypes to do its job...
     //
@@ -41,7 +41,7 @@
   NumKilled("deadtypeelim", "Number of unused typenames removed from symtab");
 }
 
-Pass *llvm::createDeadTypeEliminationPass() {
+ModulePass *llvm::createDeadTypeEliminationPass() {
   return new DTE();
 }
 
@@ -65,7 +65,7 @@
 // uglier to look at, so we nuke them.  Also eliminate types that are never used
 // in the entire program as indicated by FindUsedTypes.
 //
-bool DTE::run(Module &M) {
+bool DTE::runOnModule(Module &M) {
   bool Changed = false;
 
   SymbolTable &ST = M.getSymbolTable();
diff --git a/llvm/lib/Transforms/IPO/ExtractFunction.cpp b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
index 41b7960..1b92fd1 100644
--- a/llvm/lib/Transforms/IPO/ExtractFunction.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractFunction.cpp
@@ -17,7 +17,7 @@
 using namespace llvm;
 
 namespace {
-  class FunctionExtractorPass : public Pass {
+  class FunctionExtractorPass : public ModulePass {
     Function *Named;
     bool deleteFunc;
   public:
@@ -28,7 +28,7 @@
     FunctionExtractorPass(Function *F = 0, bool deleteFn = true) 
       : Named(F), deleteFunc(deleteFn) {}
 
-    bool run(Module &M) {
+    bool runOnModule(Module &M) {
       if (Named == 0) {
         Named = M.getMainFunction();
         if (Named == 0) return false;  // No function to extract
@@ -112,6 +112,6 @@
   RegisterPass<FunctionExtractorPass> X("extract", "Function Extractor");
 }
 
-Pass *llvm::createFunctionExtractionPass(Function *F, bool deleteFn) {
+ModulePass *llvm::createFunctionExtractionPass(Function *F, bool deleteFn) {
   return new FunctionExtractorPass(F, deleteFn);
 }
diff --git a/llvm/lib/Transforms/IPO/FunctionResolution.cpp b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
index 006d33c..3450662 100644
--- a/llvm/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
@@ -35,17 +35,17 @@
   Statistic<>NumResolved("funcresolve", "Number of varargs functions resolved");
   Statistic<> NumGlobals("funcresolve", "Number of global variables resolved");
 
-  struct FunctionResolvingPass : public Pass {
+  struct FunctionResolvingPass : public ModulePass {
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<TargetData>();
     }
 
-    bool run(Module &M);
+    bool runOnModule(Module &M);
   };
   RegisterOpt<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
 }
 
-Pass *llvm::createFunctionResolvingPass() {
+ModulePass *llvm::createFunctionResolvingPass() {
   return new FunctionResolvingPass();
 }
 
@@ -293,7 +293,7 @@
   return false;
 }
 
-bool FunctionResolvingPass::run(Module &M) {
+bool FunctionResolvingPass::runOnModule(Module &M) {
   std::map<std::string, std::vector<GlobalValue*> > Globals;
 
   // Loop over the globals, adding them to the Globals map.  We use a two pass
diff --git a/llvm/lib/Transforms/IPO/GlobalConstifier.cpp b/llvm/lib/Transforms/IPO/GlobalConstifier.cpp
index dd9894c..f37be86 100644
--- a/llvm/lib/Transforms/IPO/GlobalConstifier.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalConstifier.cpp
@@ -31,14 +31,14 @@
 namespace {
   Statistic<> NumMarked("constify", "Number of globals marked constant");
 
-  struct Constifier : public Pass {
-    bool run(Module &M);
+  struct Constifier : public ModulePass {
+    bool runOnModule(Module &M);
   };
 
   RegisterOpt<Constifier> X("constify", "Global Constifier");
 }
 
-Pass *llvm::createGlobalConstifierPass() { return new Constifier(); }
+ModulePass *llvm::createGlobalConstifierPass() { return new Constifier(); }
 
 /// A lot of global constants are stored only in trivially dead setter
 /// functions.  Because we don't want to cycle between globaldce and this pass,
@@ -81,7 +81,7 @@
   return false;
 }
 
-bool Constifier::run(Module &M) {
+bool Constifier::runOnModule(Module &M) {
   bool Changed = false;
   std::set<PHINode*> PHIUsers;
   for (Module::giterator GV = M.gbegin(), E = M.gend(); GV != E; ++GV)
diff --git a/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
index ea5201c..cdf994a 100644
--- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalDCE.cpp
@@ -27,11 +27,11 @@
   Statistic<> NumFunctions("globaldce","Number of functions removed");
   Statistic<> NumVariables("globaldce","Number of global variables removed");
 
-  struct GlobalDCE : public Pass {
+  struct GlobalDCE : public ModulePass {
     // run - Do the GlobalDCE pass on the specified module, optionally updating
     // the specified callgraph to reflect the changes.
     //
-    bool run(Module &M);
+    bool runOnModule(Module &M);
 
   private:
     std::set<GlobalValue*> AliveGlobals;
@@ -47,9 +47,9 @@
   RegisterOpt<GlobalDCE> X("globaldce", "Dead Global Elimination");
 }
 
-Pass *llvm::createGlobalDCEPass() { return new GlobalDCE(); }
+ModulePass *llvm::createGlobalDCEPass() { return new GlobalDCE(); }
 
-bool GlobalDCE::run(Module &M) {
+bool GlobalDCE::runOnModule(Module &M) {
   bool Changed = false;
   // Loop over the module, adding globals which are obviously necessary.
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
diff --git a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
index 74a0a9b..64d1df8 100644
--- a/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
+++ b/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp
@@ -29,17 +29,17 @@
 
   /// IPCP - The interprocedural constant propagation pass
   ///
-  struct IPCP : public Pass {
-    bool run(Module &M);
+  struct IPCP : public ModulePass {
+    bool runOnModule(Module &M);
   private:
     bool processFunction(Function &F);
   };
   RegisterOpt<IPCP> X("ipconstprop", "Interprocedural constant propagation");
 }
 
-Pass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
+ModulePass *llvm::createIPConstantPropagationPass() { return new IPCP(); }
 
-bool IPCP::run(Module &M) {
+bool IPCP::runOnModule(Module &M) {
   bool Changed = false;
   bool LocalChange = true;
 
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp
index 1722fe5..6a43143 100644
--- a/llvm/lib/Transforms/IPO/InlineSimple.cpp
+++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp
@@ -66,7 +66,7 @@
   RegisterOpt<SimpleInliner> X("inline", "Function Integration/Inlining");
 }
 
-Pass *llvm::createFunctionInliningPass() { return new SimpleInliner(); }
+ModulePass *llvm::createFunctionInliningPass() { return new SimpleInliner(); }
 
 // CountCodeReductionForConstant - Figure out an approximation for how many
 // instructions will be constant folded if the specified value is constant.
diff --git a/llvm/lib/Transforms/IPO/Internalize.cpp b/llvm/lib/Transforms/IPO/Internalize.cpp
index c6b75b1..5e436aa 100644
--- a/llvm/lib/Transforms/IPO/Internalize.cpp
+++ b/llvm/lib/Transforms/IPO/Internalize.cpp
@@ -39,7 +39,7 @@
           cl::desc("A list of symbol names to preserve"),
           cl::CommaSeparated);
  
-  class InternalizePass : public Pass {
+  class InternalizePass : public ModulePass {
     std::set<std::string> ExternalNames;
   public:
     InternalizePass() {
@@ -65,7 +65,7 @@
       }
     }
 
-    virtual bool run(Module &M) {
+    virtual bool runOnModule(Module &M) {
       // If no list or file of symbols was specified, check to see if there is a
       // "main" symbol defined in the module.  If so, use it, otherwise do not
       // internalize the module, it must be a library or something.
@@ -117,6 +117,6 @@
   RegisterOpt<InternalizePass> X("internalize", "Internalize Global Symbols");
 } // end anonymous namespace
 
-Pass *llvm::createInternalizePass() {
+ModulePass *llvm::createInternalizePass() {
   return new InternalizePass();
 }
diff --git a/llvm/lib/Transforms/IPO/LoopExtractor.cpp b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
index e1ce290..1bdb5c2 100644
--- a/llvm/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/llvm/lib/Transforms/IPO/LoopExtractor.cpp
@@ -126,7 +126,7 @@
 // createSingleLoopExtractorPass - This pass extracts one natural loop from the
 // program into a function if it can.  This is used by bugpoint.
 //
-Pass *llvm::createSingleLoopExtractorPass() {
+ModulePass *llvm::createSingleLoopExtractorPass() {
   return new SingleLoopExtractor();
 }
 
@@ -135,13 +135,13 @@
   /// BlockExtractorPass - This pass is used by bugpoint to extract all blocks
   /// from the module into their own functions except for those specified by the
   /// BlocksToNotExtract list.
-  class BlockExtractorPass : public Pass {
+  class BlockExtractorPass : public ModulePass {
     std::vector<BasicBlock*> BlocksToNotExtract;
   public:
     BlockExtractorPass(std::vector<BasicBlock*> &B) : BlocksToNotExtract(B) {}
     BlockExtractorPass() {}
 
-    bool run(Module &M);
+    bool runOnModule(Module &M);
   };
   RegisterOpt<BlockExtractorPass>
   XX("extract-blocks", "Extract Basic Blocks From Module (for bugpoint use)");
@@ -150,11 +150,11 @@
 // createBlockExtractorPass - This pass extracts all blocks (except those
 // specified in the argument list) from the functions in the module.
 //
-Pass *llvm::createBlockExtractorPass(std::vector<BasicBlock*> &BTNE) {
+ModulePass *llvm::createBlockExtractorPass(std::vector<BasicBlock*> &BTNE) {
   return new BlockExtractorPass(BTNE);
 }
 
-bool BlockExtractorPass::run(Module &M) {
+bool BlockExtractorPass::runOnModule(Module &M) {
   std::set<BasicBlock*> TranslatedBlocksToNotExtract;
   for (unsigned i = 0, e = BlocksToNotExtract.size(); i != e; ++i) {
     BasicBlock *BB = BlocksToNotExtract[i];
diff --git a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
index ebd0500..4ad89b5 100644
--- a/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
+++ b/llvm/lib/Transforms/IPO/LowerSetJmp.cpp
@@ -64,7 +64,7 @@
   // class because it works on a module as a whole, not a function at a
   // time.
 
-  class LowerSetJmp : public Pass,
+  class LowerSetJmp : public ModulePass,
                       public InstVisitor<LowerSetJmp> {
     // LLVM library functions...
     Function* InitSJMap;        // __llvm_sjljeh_init_setjmpmap
@@ -119,7 +119,7 @@
     void visitReturnInst(ReturnInst& RI);
     void visitUnwindInst(UnwindInst& UI);
 
-    bool run(Module& M);
+    bool runOnModule(Module& M);
     bool doInitialization(Module& M);
   };
 
@@ -129,8 +129,7 @@
 // run - Run the transformation on the program. We grab the function
 // prototypes for longjmp and setjmp. If they are used in the program,
 // then we can go directly to the places they're at and transform them.
-bool LowerSetJmp::run(Module& M)
-{
+bool LowerSetJmp::runOnModule(Module& M) {
   bool Changed = false;
 
   // These are what the functions are called.
@@ -509,8 +508,7 @@
 
 // visitReturnInst - We want to destroy the setjmp map upon exit from the
 // function.
-void LowerSetJmp::visitReturnInst(ReturnInst& RI)
-{
+void LowerSetJmp::visitReturnInst(ReturnInst &RI) {
   Function* Func = RI.getParent()->getParent();
   new CallInst(DestroySJMap, make_vector<Value*>(GetSetJmpMap(Func), 0),
                "", &RI);
@@ -518,15 +516,13 @@
 
 // visitUnwindInst - We want to destroy the setjmp map upon exit from the
 // function.
-void LowerSetJmp::visitUnwindInst(UnwindInst& UI)
-{
+void LowerSetJmp::visitUnwindInst(UnwindInst &UI) {
   Function* Func = UI.getParent()->getParent();
   new CallInst(DestroySJMap, make_vector<Value*>(GetSetJmpMap(Func), 0),
                "", &UI);
 }
 
-Pass* llvm::createLowerSetJmpPass()
-{
+ModulePass *llvm::createLowerSetJmpPass() {
   return new LowerSetJmp();
 }
 
diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp
index 43b9acf..36423c8 100644
--- a/llvm/lib/Transforms/IPO/PruneEH.cpp
+++ b/llvm/lib/Transforms/IPO/PruneEH.cpp
@@ -38,7 +38,7 @@
   RegisterOpt<PruneEH> X("prune-eh", "Remove unused exception handling info");
 }
 
-Pass *llvm::createPruneEHPass() { return new PruneEH(); }
+ModulePass *llvm::createPruneEHPass() { return new PruneEH(); }
 
 
 bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
index 42edb7e..d91d23fd 100644
--- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -28,7 +28,7 @@
   // RaiseAllocations - Turn %malloc and %free calls into the appropriate
   // instruction.
   //
-  class RaiseAllocations : public Pass {
+  class RaiseAllocations : public ModulePass {
     Function *MallocFunc;   // Functions in the module we are processing
     Function *FreeFunc;     // Initialized by doPassInitializationVirt
   public:
@@ -41,7 +41,7 @@
     
     // run - This method does the actual work of converting instructions over.
     //
-    bool run(Module &M);
+    bool runOnModule(Module &M);
   };
   
   RegisterOpt<RaiseAllocations>
@@ -50,7 +50,7 @@
 
 
 // createRaiseAllocationsPass - The interface to this file...
-Pass *llvm::createRaiseAllocationsPass() {
+ModulePass *llvm::createRaiseAllocationsPass() {
   return new RaiseAllocations();
 }
 
@@ -114,7 +114,7 @@
 
 // run - Transform calls into instructions...
 //
-bool RaiseAllocations::run(Module &M) {
+bool RaiseAllocations::runOnModule(Module &M) {
   // Find the malloc/free prototypes...
   doInitialization(M);
 
diff --git a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
index e357e84..f22f81f 100644
--- a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp
@@ -29,15 +29,15 @@
 using namespace llvm;
 
 namespace {
-  class FunctionProfiler : public Pass {
-    bool run(Module &M);
+  class FunctionProfiler : public ModulePass {
+    bool runOnModule(Module &M);
   };
 
   RegisterOpt<FunctionProfiler> X("insert-function-profiling",
                                "Insert instrumentation for function profiling");
 }
 
-bool FunctionProfiler::run(Module &M) {
+bool FunctionProfiler::runOnModule(Module &M) {
   Function *Main = M.getMainFunction();
   if (Main == 0) {
     std::cerr << "WARNING: cannot insert function profiling into a module"
@@ -69,15 +69,15 @@
 
 
 namespace {
-  class BlockProfiler : public Pass {
-    bool run(Module &M);
+  class BlockProfiler : public ModulePass {
+    bool runOnModule(Module &M);
   };
 
   RegisterOpt<BlockProfiler> Y("insert-block-profiling",
                                "Insert instrumentation for block profiling");
 }
 
-bool BlockProfiler::run(Module &M) {
+bool BlockProfiler::runOnModule(Module &M) {
   Function *Main = M.getMainFunction();
   if (Main == 0) {
     std::cerr << "WARNING: cannot insert block profiling into a module"
diff --git a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index c584ca5..89c540c 100644
--- a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp
@@ -28,15 +28,15 @@
 using namespace llvm;
 
 namespace {
-  class EdgeProfiler : public Pass {
-    bool run(Module &M);
+  class EdgeProfiler : public ModulePass {
+    bool runOnModule(Module &M);
   };
 
   RegisterOpt<EdgeProfiler> X("insert-edge-profiling",
                               "Insert instrumentation for edge profiling");
 }
 
-bool EdgeProfiler::run(Module &M) {
+bool EdgeProfiler::runOnModule(Module &M) {
   Function *Main = M.getMainFunction();
   if (Main == 0) {
     std::cerr << "WARNING: cannot insert edge profiling into a module"
diff --git a/llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp b/llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp
index a1c23da..92abffb 100644
--- a/llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp
+++ b/llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp
@@ -27,8 +27,8 @@
     BLACK
   };
   
-  struct EmitFunctionTable : public Pass {
-    bool run(Module &M);
+  struct EmitFunctionTable : public ModulePass {
+    bool runOnModule(Module &M);
   };
   
   RegisterOpt<EmitFunctionTable>
@@ -64,7 +64,7 @@
 }
 
 // Per Module pass for inserting function table
-bool EmitFunctionTable::run(Module &M){
+bool EmitFunctionTable::runOnModule(Module &M){
   std::vector<const Type*> vType;
  
   std::vector<Constant *> vConsts;
diff --git a/llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
index 60426c4..746e822 100644
--- a/llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
+++ b/llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp
@@ -25,8 +25,8 @@
 using namespace llvm;
 
 namespace {
-  class TraceBasicBlocks : public Pass {
-    bool run(Module &M);
+  class TraceBasicBlocks : public ModulePass {
+    bool runOnModule(Module &M);
   };
 
   RegisterOpt<TraceBasicBlocks> X("trace-basic-blocks",
@@ -52,7 +52,7 @@
   Instruction *InstrCall = new CallInst (InstrFn, Args, "", InsertPos);
 }
 
-bool TraceBasicBlocks::run(Module &M) {
+bool TraceBasicBlocks::runOnModule(Module &M) {
   Function *Main = M.getMainFunction();
   if (Main == 0) {
     std::cerr << "WARNING: cannot insert basic-block trace instrumentation"