[llvm] r238804 - [RuntimeDydlELF] Use range-based loop.

Davide Italiano davide at freebsd.org
Mon Jun 1 18:52:28 PDT 2015


Author: davide
Date: Mon Jun  1 20:52:28 2015
New Revision: 238804

URL: http://llvm.org/viewvc/llvm-project?rev=238804&view=rev
Log:
[RuntimeDydlELF] Use range-based loop.

Differential Revision:	http://reviews.llvm.org/D10165
Reviewed by:	rafael

Modified:
    llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp

Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp?rev=238804&r1=238803&r2=238804&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Mon Jun  1 20:52:28 2015
@@ -714,17 +714,15 @@ void RuntimeDyldELF::findPPC64TOCSection
 
   // 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;
     }
   }





More information about the llvm-commits mailing list