diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 6883e9f9b12..a56938c1592 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -1444,16 +1444,8 @@ bool FPPassManager::runOnFunction(Function &F) { bool FPPassManager::runOnModule(Module &M) { bool Changed = doInitialization(M); - for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { - Function &F = *I; - if (F.isMaterializable()) { - std::string errstr; - if (F.Materialize(&errstr)) - report_fatal_error("Error reading bitcode file: " + Twine(errstr)); - } - + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) runOnFunction(*I); - } return doFinalization(M) || Changed; }