From abb81054d1ac57014774b092ce3094c47effbddb Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 15 Nov 2006 01:11:27 +0000 Subject: [PATCH] Do not derive CommonPassManagerImpl from Pass. Now BasicBlockPassManager_New is a FunctionPass, FunctionPassManager_New is a ModulePass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31744 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/PassManager.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 1e7089745ee..6ce61c35623 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -24,7 +24,7 @@ namespace llvm { /// CommonPassManagerImpl helps pass manager analysis required by /// the managed passes. It provides methods to add/remove analysis /// available and query if certain analysis is available or not. -class CommonPassManagerImpl : public Pass { +class CommonPassManagerImpl { public: @@ -124,7 +124,8 @@ private: /// BasicBlockPassManager_New manages BasicBlockPass. It batches all the /// pass together and sequence them to process one basic block before /// processing next basic block. -class BasicBlockPassManager_New : public CommonPassManagerImpl { +class BasicBlockPassManager_New : public CommonPassManagerImpl, + public FunctionPass { public: BasicBlockPassManager_New() { } @@ -146,7 +147,8 @@ private: /// It batches all function passes and basic block pass managers together and /// sequence them to process one function at a time before processing next /// function. -class FunctionPassManagerImpl_New : public CommonPassManagerImpl { +class FunctionPassManagerImpl_New : public CommonPassManagerImpl, + public ModulePass { public: FunctionPassManagerImpl_New(ModuleProvider *P) { /* TODO */ } FunctionPassManagerImpl_New() { @@ -353,8 +355,8 @@ void CommonPassManagerImpl::addPassToManager (Pass *P, // implementations it needs. // void CommonPassManagerImpl::initializeAnalysisImpl(Pass *P) { - AnalysisUsage AnUsage; - P->getAnalysisUsage(AnUsage); + AnalysisUsage AnUsage; + P->getAnalysisUsage(AnUsage); for (std::vector::const_iterator I = AnUsage.getRequiredSet().begin(), -- 2.34.1