summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-13 03:50:50 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-13 03:50:50 +0000
commit054be92e1da7015190377d6bade57196f28cf33a (patch)
tree331943b2f1c0bd105afd2fa57174a7448a7b295c /lib
parent2661f11e4602ad017fa155f6fdcee0a4f2d1ae86 (diff)
downloadllvm-054be92e1da7015190377d6bade57196f28cf33a.tar.gz
llvm-054be92e1da7015190377d6bade57196f28cf33a.tar.bz2
llvm-054be92e1da7015190377d6bade57196f28cf33a.tar.xz
Fix -Asserts warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCAssembler.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 7391285790..e62296f35d 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -562,11 +562,9 @@ static void WriteFragmentData(const MCAssembler &Asm, const MCAsmLayout &Layout,
void MCAssembler::WriteSectionData(const MCSectionData *SD,
const MCAsmLayout &Layout,
MCObjectWriter *OW) const {
- uint64_t SectionFileSize = Layout.getSectionFileSize(SD);
-
// Ignore virtual sections.
if (getBackend().isVirtualSection(SD->getSection())) {
- assert(SectionFileSize == 0 && "Invalid size for section!");
+ assert(Layout.getSectionFileSize(SD) == 0 && "Invalid size for section!");
// Check that contents are only things legal inside a virtual section.
for (MCSectionData::const_iterator it = SD->begin(),
@@ -595,7 +593,7 @@ void MCAssembler::WriteSectionData(const MCSectionData *SD,
ie = SD->end(); it != ie; ++it)
WriteFragmentData(*this, Layout, *it, OW);
- assert(OW->getStream().tell() - Start == SectionFileSize);
+ assert(OW->getStream().tell() - Start == Layout.getSectionFileSize(SD));
}
void MCAssembler::Finish() {