Stop using MCSectionData in MCAsmLayout.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238170 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-05-26 02:00:36 +00:00
parent 369611994b
commit ea3533b4c6
7 changed files with 57 additions and 57 deletions

View File

@@ -1314,12 +1314,10 @@ void ELFObjectWriter::writeSectionHeader(
const std::pair<uint64_t, uint64_t> &Offsets =
SectionOffsets.find(Section)->second;
uint64_t Size;
if (Type == ELF::SHT_NOBITS) {
const MCSectionData &SD = Asm.getSectionData(*Section);
Size = Layout.getSectionAddressSize(&SD);
} else {
if (Type == ELF::SHT_NOBITS)
Size = Layout.getSectionAddressSize(Section);
else
Size = Offsets.second - Offsets.first;
}
writeSection(SectionIndexMap, GroupSymbolIndex, Offsets.first, Size,
*Section);