During runOnModule() do initialization and finalization.

llvm-svn: 32371
This commit is contained in:
Devang Patel 2006-12-08 19:04:09 +00:00
parent 1929089ea2
commit 0e29e29cc5
1 changed files with 2 additions and 2 deletions

View File

@ -840,13 +840,13 @@ FunctionPassManagerImpl_New::addPass(Pass *P) {
/// the function, and if so, return true.
bool FunctionPassManagerImpl_New::runOnModule(Module &M) {
bool Changed = false;
bool Changed = doInitialization(M);
initializeAnalysisInfo();
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
this->runOnFunction(*I);
return Changed;
return Changed | doFinalization(M);
}
/// Execute all of the passes scheduled for execution by invoking