summaryrefslogtreecommitdiff
path: root/lib/IR/PassManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/PassManager.cpp')
-rw-r--r--lib/IR/PassManager.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/IR/PassManager.cpp b/lib/IR/PassManager.cpp
index b53a2b9671..35fc534151 100644
--- a/lib/IR/PassManager.cpp
+++ b/lib/IR/PassManager.cpp
@@ -53,15 +53,14 @@ void ModuleAnalysisManager::invalidateImpl(void *PassID, Module *M) {
ModuleAnalysisResults.erase(PassID);
}
-bool FunctionPassManager::run(Module *M) {
+bool FunctionPassManager::run(Function *F) {
bool Changed = false;
- for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
- for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx)
- if (Passes[Idx]->run(I)) {
- Changed = true;
- if (AM)
- AM->invalidateAll(I);
- }
+ for (unsigned Idx = 0, Size = Passes.size(); Idx != Size; ++Idx)
+ if (Passes[Idx]->run(F)) {
+ Changed = true;
+ if (AM)
+ AM->invalidateAll(F);
+ }
return Changed;
}