From: Rafael Espindola Date: Tue, 28 Apr 2015 19:07:16 +0000 (+0000) Subject: Use a range loop. NFC. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=3813ef68868f3379458accd8fdf89869e2ecf6da;p=oota-llvm.git Use a range loop. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236015 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 8a41654a8eb..ccf3a8ed27d 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -1611,9 +1611,8 @@ void ELFObjectWriter::WriteObject(MCAssembler &Asm, WriteHeader(Asm, NumSections + 1); // ... then the sections ... - for (unsigned i = 0; i < NumSections; ++i) { - const MCSectionELF &Section = *Sections[i]; - const MCSectionData &SD = Asm.getOrCreateSectionData(Section); + for (const MCSectionELF *Section : Sections) { + const MCSectionData &SD = Asm.getOrCreateSectionData(*Section); uint64_t Padding = OffsetToAlignment(OS.tell(), SD.getAlignment()); WriteZeros(Padding);