From 73e88002290920f2d1599bde7878ed01a9e8c242 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 11 Aug 2010 19:05:53 +0000 Subject: [PATCH] Delete FunctionPass::runOnModule, which is unused. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110842 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Pass.h | 6 ------ lib/VMCore/Pass.cpp | 13 ------------- 2 files changed, 19 deletions(-) diff --git a/include/llvm/Pass.h b/include/llvm/Pass.h index 4cbf27b98b4..7760bc193a8 100644 --- a/include/llvm/Pass.h +++ b/include/llvm/Pass.h @@ -295,12 +295,6 @@ public: /// virtual bool doFinalization(Module &); - /// runOnModule - On a module, we run this pass by initializing, - /// ronOnFunction'ing once for every function in the module, then by - /// finalizing. - /// - virtual bool runOnModule(Module &M); - /// run - On a function, we simply initialize, run the function, then /// finalize. /// diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index 41a87d60ad6..1afebc54eee 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -141,19 +141,6 @@ Pass *FunctionPass::createPrinterPass(raw_ostream &O, return createPrintFunctionPass(Banner, &O); } -// run - On a module, we run this pass by initializing, runOnFunction'ing once -// for every function in the module, then by finalizing. -// -bool FunctionPass::runOnModule(Module &M) { - bool Changed = doInitialization(M); - - for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isDeclaration()) // Passes are not run on external functions! - Changed |= runOnFunction(*I); - - return Changed | doFinalization(M); -} - // run - On a function, we simply initialize, run the function, then finalize. // bool FunctionPass::run(Function &F) { -- 2.34.1