diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/MC/ELFObjectWriter.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 90555ba5345..068c1293548 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -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; |