mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 16:41:06 +03:00
Make use of C++11 range-based for
Should be available now that support for LLVM < 3.5 has been dropped.
This commit is contained in:
parent
3d803c7a1c
commit
2d959ea540
34 changed files with 182 additions and 335 deletions
|
@ -402,8 +402,8 @@ bool ldc_optimize_module(llvm::Module *M)
|
|||
|
||||
// Run per-function passes.
|
||||
fpm.doInitialization();
|
||||
for (llvm::Module::iterator F = M->begin(), E = M->end(); F != E; ++F)
|
||||
fpm.run(*F);
|
||||
for (auto& F : *M)
|
||||
fpm.run(F);
|
||||
fpm.doFinalization();
|
||||
|
||||
// Run per-module passes.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue