[LLD/PDB] Remove improper assert.
authorZachary Turner <zturner@google.com>
Fri, 20 Apr 2018 18:36:51 +0000 (18:36 +0000)
committerZachary Turner <zturner@google.com>
Fri, 20 Apr 2018 18:36:51 +0000 (18:36 +0000)
It's possible to have an empty object file, for example if you
just compile an empty .c file.  This file won't have any sections
so asserting that a file has chunks is definitely wrong.

llvm-svn: 330461

lld/COFF/PDB.cpp

index a3548ad..43a2780 100644 (file)
@@ -818,7 +818,6 @@ void PDBLinker::addObjFile(ObjFile *File) {
   File->ModuleDBI->setObjFileName(Path);
 
   auto Chunks = File->getChunks();
-  assert(!Chunks.empty());
   uint32_t Modi = File->ModuleDBI->getModuleIndex();
   for (Chunk *C : Chunks) {
     auto *SecChunk = dyn_cast<SectionChunk>(C);