summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index a211dcfecf8..6dd8bd74669 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -1348,8 +1348,9 @@ void ELFObjectWriter::WriteObject(MCAssembler &Asm,
SectionOffsetsTy SectionOffsets;
std::vector<MCSectionELF *> Groups;
std::vector<MCSectionELF *> Relocations;
- for (const MCSectionData &SD : Asm) {
- const MCSectionELF &Section = static_cast<MCSectionELF &>(SD.getSection());
+ for (const MCSection &Sec : Asm) {
+ const MCSectionELF &Section = static_cast<const MCSectionELF &>(Sec);
+ const MCSectionData &SD = Section.getSectionData();
uint64_t Padding = OffsetToAlignment(OS.tell(), Section.getAlignment());
WriteZeros(Padding);
OpenPOWER on IntegriCloud