]> granicus.if.org Git - llvm/commitdiff
Use a range loop. NFC.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 28 Apr 2015 21:58:05 +0000 (21:58 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 28 Apr 2015 21:58:05 +0000 (21:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236047 91177308-0d34-0410-b5e6-96231b3b80d8

lib/MC/ELFObjectWriter.cpp

index 90555ba53450dd7552cf9dcad0c6f92a827cd816..068c1293548db231a77056f6d095d8e3c7b53010 100644 (file)
@@ -1454,10 +1454,9 @@ void ELFObjectWriter::createIndexedSections(
   MCContext &Ctx = Asm.getContext();
 
   // Build the groups
-  for (MCAssembler::const_iterator it = Asm.begin(), ie = Asm.end();
-       it != ie; ++it) {
+  for (const MCSectionData &SD : Asm) {
     const MCSectionELF &Section =
-      static_cast<const MCSectionELF&>(it->getSection());
+        static_cast<const MCSectionELF &>(SD.getSection());
     if (!(Section.getFlags() & ELF::SHF_GROUP))
       continue;