Fix non-debug build.

llvm-svn: 238474
This commit is contained in:
Rui Ueyama 2015-05-28 20:04:51 +00:00
parent 450fbee6b2
commit 9aefa0c6b9
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H, uint32_t SI)
}
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());