From 97856ceeab2297e09c46c2390f7b3d818df6f1f7 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 8 Dec 2006 19:03:05 +0000 Subject: [PATCH] Reuse code. Directly use runOnFunction(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32370 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/PassManager.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 64585f93995..6b6921cedde 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -844,16 +844,8 @@ bool FunctionPassManagerImpl_New::runOnModule(Module &M) { initializeAnalysisInfo(); for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - for (std::vector::iterator itr = passVectorBegin(), - e = passVectorEnd(); itr != e; ++itr) { - Pass *P = *itr; - - FunctionPass *FP = dynamic_cast(P); - Changed |= FP->runOnFunction(*I); - removeNotPreservedAnalysis(P); - recordAvailableAnalysis(P); - removeDeadPasses(P); - } + this->runOnFunction(*I); + return Changed; }