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"); PrettyStackTraceString CrashInfo("Per-function optimization");
PerFunctionPasses->doInitialization(); PerFunctionPasses->doInitialization();
for (Module::iterator I = TheModule->begin(), for (Function &F : *TheModule)
E = TheModule->end(); I != E; ++I) if (!F.isDeclaration())
if (!I->isDeclaration()) PerFunctionPasses->run(F);
PerFunctionPasses->run(*I);
PerFunctionPasses->doFinalization(); PerFunctionPasses->doFinalization();
} }