diff options
| author | Davide Italiano <davide@freebsd.org> | 2015-06-02 01:52:28 +0000 |
|---|---|---|
| committer | Davide Italiano <davide@freebsd.org> | 2015-06-02 01:52:28 +0000 |
| commit | 2e9df17aa7a38b674e8a21531d31b72c21b8be66 (patch) | |
| tree | ac6d2cc376a6015bd22af73cd450928b2fbec6f8 /llvm/lib/ExecutionEngine/RuntimeDyld | |
| parent | 03d5dd28251badc63a841a48a317a36f8d566b98 (diff) | |
| download | bcm5719-llvm-2e9df17aa7a38b674e8a21531d31b72c21b8be66.tar.gz bcm5719-llvm-2e9df17aa7a38b674e8a21531d31b72c21b8be66.zip | |
[RuntimeDydlELF] Use range-based loop.
Differential Revision: http://reviews.llvm.org/D10165
Reviewed by: rafael
llvm-svn: 238804
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
| -rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index c0823c9cbf7..204f91b74a0 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -714,17 +714,15 @@ void RuntimeDyldELF::findPPC64TOCSection(const ObjectFile &Obj, // 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; } } |

