C++ 11 rangify for loop.

llvm-svn: 239140
This commit is contained in:
Yaron Keren 2015-06-05 09:40:53 +00:00
parent 917fa5ee66
commit 10d6d1689b
1 changed files with 3 additions and 4 deletions

View File

@ -622,10 +622,9 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
PrettyStackTraceString CrashInfo("Per-function optimization");
PerFunctionPasses->doInitialization();
for (Module::iterator I = TheModule->begin(),
E = TheModule->end(); I != E; ++I)
if (!I->isDeclaration())
PerFunctionPasses->run(*I);
for (Function &F : *TheModule)
if (!F.isDeclaration())
PerFunctionPasses->run(F);
PerFunctionPasses->doFinalization();
}