forked from OSchip/llvm-project
parent
917fa5ee66
commit
10d6d1689b
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue