<p dir="ltr">Lgtm</p>
<div class="gmail_quote">On Jun 1, 2015 2:29 PM, "Davide Italiano" <<a href="mailto:dccitaliano@gmail.com">dccitaliano@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi lhames,<br>
<br>
Stumbled upon this while experimenting LLD section-based ELF backend.<br>
<br>
REPOSITORY<br>
  rL LLVM<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10165&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=ybZgKWF-AleAYHxSbtOcbNvlXiGAY_jK90kE8t57J44&s=cAdkovGOltNWgHWrPpmKca6YDorI8PM-VROuVjLqb6U&e=" target="_blank">http://reviews.llvm.org/D10165</a><br>
<br>
Files:<br>
  lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
<br>
Index: lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
===================================================================<br>
--- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
+++ lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp<br>
@@ -714,17 +714,15 @@<br>
<br>
   // The TOC consists of sections .got, .toc, .tocbss, .plt in that<br>
   // order. The TOC starts where the first of these sections starts.<br>
-  for (section_iterator si = Obj.section_begin(), se = Obj.section_end();<br>
-       si != se; ++si) {<br>
-<br>
+  for (auto &Section: Obj.sections()) {<br>
     StringRef SectionName;<br>
-    check(si->getName(SectionName));<br>
+    check(Section.getName(SectionName));<br>
<br>
     if (SectionName == ".got"<br>
         || SectionName == ".toc"<br>
         || SectionName == ".tocbss"<br>
         || SectionName == ".plt") {<br>
-      Rel.SectionID = findOrEmitSection(Obj, *si, false, LocalSections);<br>
+      Rel.SectionID = findOrEmitSection(Obj, Section, false, LocalSections);<br>
       break;<br>
     }<br>
   }<br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=ybZgKWF-AleAYHxSbtOcbNvlXiGAY_jK90kE8t57J44&s=22D6F9oMwvCMsPDy004-Hgld3tDuzqaV5UqtpP2Eapk&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div>