[PATCH] [RuntimeDydlELF] Use range-based loop
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Jun 1 11:31:11 PDT 2015
Lgtm
On Jun 1, 2015 2:29 PM, "Davide Italiano" <dccitaliano at gmail.com> wrote:
> Hi lhames,
>
> Stumbled upon this while experimenting LLD section-based ELF backend.
>
> REPOSITORY
> rL LLVM
>
> http://reviews.llvm.org/D10165
>
> Files:
> lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
>
> Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
> ===================================================================
> --- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
> +++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
> @@ -714,17 +714,15 @@
>
> // The TOC consists of sections .got, .toc, .tocbss, .plt in that
> // order. The TOC starts where the first of these sections starts.
> - for (section_iterator si = Obj.section_begin(), se = Obj.section_end();
> - si != se; ++si) {
> -
> + for (auto &Section: Obj.sections()) {
> StringRef SectionName;
> - check(si->getName(SectionName));
> + check(Section.getName(SectionName));
>
> if (SectionName == ".got"
> || SectionName == ".toc"
> || SectionName == ".tocbss"
> || SectionName == ".plt") {
> - Rel.SectionID = findOrEmitSection(Obj, *si, false, LocalSections);
> + Rel.SectionID = findOrEmitSection(Obj, Section, false,
> LocalSections);
> break;
> }
> }
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150601/2e06e9ce/attachment.html>
More information about the llvm-commits
mailing list