From c71ca3cdd2d7a08b043ebb717cad0beadaf47450 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 26 Jan 2007 00:47:38 +0000 Subject: Inherit CallGraphSCCPass directly from Pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33514 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CallGraphSCCPass.h | 2 +- include/llvm/Transforms/IPO.h | 7 ++++--- lib/Transforms/IPO/ArgumentPromotion.cpp | 2 +- lib/Transforms/IPO/InlineSimple.cpp | 2 +- lib/Transforms/IPO/PruneEH.cpp | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/llvm/CallGraphSCCPass.h b/include/llvm/CallGraphSCCPass.h index f64ece41b6..67b2db253d 100644 --- a/include/llvm/CallGraphSCCPass.h +++ b/include/llvm/CallGraphSCCPass.h @@ -29,7 +29,7 @@ class CallGraphNode; class CallGraph; class PMStack; -struct CallGraphSCCPass : public ModulePass { +struct CallGraphSCCPass : public Pass { /// doInitialization - This method is called before the SCC's of the program /// has been processed, allowing the pass to do initialization as necessary. diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h index 54e6b3459e..44ffa473e4 100644 --- a/include/llvm/Transforms/IPO.h +++ b/include/llvm/Transforms/IPO.h @@ -21,6 +21,7 @@ namespace llvm { class FunctionPass; class ModulePass; +class Pass; class Function; class BasicBlock; @@ -101,13 +102,13 @@ ModulePass *createFunctionResolvingPass(); /// createFunctionInliningPass - Return a new pass object that uses a heuristic /// to inline direct function calls to small functions. /// -ModulePass *createFunctionInliningPass(); +Pass *createFunctionInliningPass(); //===----------------------------------------------------------------------===// /// createPruneEHPass - Return a new pass object which transforms invoke /// instructions into calls, if the callee can _not_ unwind the stack. /// -ModulePass *createPruneEHPass(); +Pass *createPruneEHPass(); //===----------------------------------------------------------------------===// /// createInternalizePass - This pass loops over all of the functions in the @@ -134,7 +135,7 @@ ModulePass *createDeadArgHackingPass(); /// createArgumentPromotionPass - This pass promotes "by reference" arguments to /// be passed by value. /// -ModulePass *createArgumentPromotionPass(); +Pass *createArgumentPromotionPass(); //===----------------------------------------------------------------------===// /// createIPConstantPropagationPass - This pass propagates constants from call diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 467214dce6..8e51e77b86 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -72,7 +72,7 @@ namespace { "Promote 'by reference' arguments to scalars"); } -ModulePass *llvm::createArgumentPromotionPass() { +Pass *llvm::createArgumentPromotionPass() { return new ArgPromotion(); } diff --git a/lib/Transforms/IPO/InlineSimple.cpp b/lib/Transforms/IPO/InlineSimple.cpp index 52d75735ef..9ee69d92b5 100644 --- a/lib/Transforms/IPO/InlineSimple.cpp +++ b/lib/Transforms/IPO/InlineSimple.cpp @@ -58,7 +58,7 @@ namespace { RegisterPass X("inline", "Function Integration/Inlining"); } -ModulePass *llvm::createFunctionInliningPass() { return new SimpleInliner(); } +Pass *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/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 14daf13ecd..c9e3455c94 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -50,7 +50,7 @@ namespace { RegisterPass X("prune-eh", "Remove unused exception handling info"); } -ModulePass *llvm::createPruneEHPass() { return new PruneEH(); } +Pass *llvm::createPruneEHPass() { return new PruneEH(); } bool PruneEH::runOnSCC(const std::vector &SCC) { -- cgit v1.2.3