Use a range loop. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-04-28 19:07:16 +00:00
parent f060668270
commit 3813ef6886

View File

@ -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);