- for (Module::iterator f = mergedModule->begin(),
- e = mergedModule->end(); f != e; ++f)
- applyRestriction(*f, Libcalls, MustPreserveList, AsmUsed, Mangler);
- for (Module::global_iterator v = mergedModule->global_begin(),
- e = mergedModule->global_end(); v != e; ++v)
- applyRestriction(*v, Libcalls, MustPreserveList, AsmUsed, Mangler);
- for (Module::alias_iterator a = mergedModule->alias_begin(),
- e = mergedModule->alias_end(); a != e; ++a)
- applyRestriction(*a, Libcalls, MustPreserveList, AsmUsed, Mangler);
+ for (Function &f : *MergedModule)
+ applyRestriction(f, Libcalls, MustPreserveList, AsmUsed, Mangler);
+ for (GlobalVariable &v : MergedModule->globals())
+ applyRestriction(v, Libcalls, MustPreserveList, AsmUsed, Mangler);
+ for (GlobalAlias &a : MergedModule->aliases())
+ applyRestriction(a, Libcalls, MustPreserveList, AsmUsed, Mangler);