[llvm-commits] [llvm] r103697 - /llvm/trunk/lib/MC/MCAssembler.cpp

Daniel Dunbar daniel at zuster.org
Wed May 12 20:50:50 PDT 2010


Author: ddunbar
Date: Wed May 12 22:50:50 2010
New Revision: 103697

URL: http://llvm.org/viewvc/llvm-project?rev=103697&view=rev
Log:
Fix -Asserts warning.

Modified:
    llvm/trunk/lib/MC/MCAssembler.cpp

Modified: llvm/trunk/lib/MC/MCAssembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAssembler.cpp?rev=103697&r1=103696&r2=103697&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAssembler.cpp (original)
+++ llvm/trunk/lib/MC/MCAssembler.cpp Wed May 12 22:50:50 2010
@@ -562,11 +562,9 @@
 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 @@
          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() {





More information about the llvm-commits mailing list