[lld] r238474 - Fix non-debug build.

Rui Ueyama ruiu at google.com
Thu May 28 13:04:51 PDT 2015


Author: ruiu
Date: Thu May 28 15:04:51 2015
New Revision: 238474

URL: http://llvm.org/viewvc/llvm-project?rev=238474&view=rev
Log:
Fix non-debug build.

Modified:
    lld/trunk/COFF/Chunks.cpp

Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=238474&r1=238473&r2=238474&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Thu May 28 15:04:51 2015
@@ -36,7 +36,8 @@ SectionChunk::SectionChunk(ObjectFile *F
 }
 
 void SectionChunk::writeTo(uint8_t *Buf) {
-  assert(hasData());
+  if (!hasData())
+    return;
   ArrayRef<uint8_t> Data;
   File->getCOFFObj()->getSectionContents(Header, Data);
   memcpy(Buf + FileOff, Data.data(), Data.size());





More information about the llvm-commits mailing list