diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-05-25 23:14:17 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-05-25 23:14:17 +0000 |
commit | a554c05d95dfe406de1613c78ab4eebf2c030adf (patch) | |
tree | 6ed75a7a5bbe9093d78fd9c364748b96b0156efe /llvm/lib/MC/WinCOFFObjectWriter.cpp | |
parent | 09266bad7f4d70c279c96c0d31ba365d350657e3 (diff) | |
download | llvm-a554c05d95dfe406de1613c78ab4eebf2c030adf.zip llvm-a554c05d95dfe406de1613c78ab4eebf2c030adf.tar.gz llvm-a554c05d95dfe406de1613c78ab4eebf2c030adf.tar.bz2 |
Turn MCSectionData into a field of MCSection.
This also changes MCAssembler to store a vector of MCSections instead of an
iplist of MCSectionData.
llvm-svn: 238159
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index 565bca3..3866eb3 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -636,7 +636,7 @@ void WinCOFFObjectWriter::ExecutePostLayoutBinding(MCAssembler &Asm, // "Define" each section & symbol. This creates section & symbol // entries in the staging area. for (const auto &Section : Asm) - DefineSection(Section); + DefineSection(Section.getSectionData()); for (const MCSymbol &Symbol : Asm.symbols()) if (ExportSymbol(Symbol, Asm)) @@ -946,12 +946,13 @@ void WinCOFFObjectWriter::WriteObject(MCAssembler &Asm, offset += COFF::SectionSize * Header.NumberOfSections; for (const auto &Section : Asm) { - COFFSection *Sec = SectionMap[&Section.getSection()]; + COFFSection *Sec = SectionMap[&Section]; if (Sec->Number == -1) continue; - Sec->Header.SizeOfRawData = Layout.getSectionAddressSize(&Section); + Sec->Header.SizeOfRawData = + Layout.getSectionAddressSize(&Section.getSectionData()); if (IsPhysicalSection(Sec)) { // Align the section data to a four byte boundary. @@ -1035,7 +1036,7 @@ void WinCOFFObjectWriter::WriteObject(MCAssembler &Asm, WriteZeros(SectionDataPadding); - Asm.writeSectionData(j, Layout); + Asm.writeSectionData(&j->getSectionData(), Layout); } if ((*i)->Relocations.size() > 0) { |