From: Rafael Espindola Date: Tue, 28 Apr 2015 20:23:35 +0000 (+0000) Subject: Use range loops. NFC. X-Git-Tag: llvmorg-3.7.0-rc1~5806 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad3cfaaa20703dfed11945e26f7f9ca0afc06566;p=platform%2Fupstream%2Fllvm.git Use range loops. NFC. llvm-svn: 236028 --- diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp index 1b11451..aaca625 100644 --- a/llvm/lib/MC/ELFObjectWriter.cpp +++ b/llvm/lib/MC/ELFObjectWriter.cpp @@ -939,20 +939,16 @@ bool ELFObjectWriter::isLocal(const MCSymbolData &Data, bool isUsedInReloc) { void ELFObjectWriter::computeIndexMap(MCAssembler &Asm, SectionIndexMapTy &SectionIndexMap) { unsigned Index = 1; - for (MCAssembler::iterator it = Asm.begin(), - ie = Asm.end(); it != ie; ++it) { + for (const MCSectionData &SD : Asm) { const MCSectionELF &Section = - static_cast(it->getSection()); + static_cast(SD.getSection()); if (Section.getType() != ELF::SHT_GROUP) continue; SectionIndexMap[&Section] = Index++; } std::vector RelSections; - - for (MCAssembler::iterator it = Asm.begin(), - ie = Asm.end(); it != ie; ++it) { - const MCSectionData &SD = *it; + for (const MCSectionData &SD : Asm) { const MCSectionELF &Section = static_cast(SD.getSection()); if (Section.getType() == ELF::SHT_GROUP ||