From: Zachary Turner Date: Fri, 20 Apr 2018 18:36:51 +0000 (+0000) Subject: [LLD/PDB] Remove improper assert. X-Git-Tag: llvmorg-7.0.0-rc1~7781 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=041eb6fef6ac824f5a903be971067b269fcead1f;p=platform%2Fupstream%2Fllvm.git [LLD/PDB] Remove improper assert. 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 --- diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index a3548ad..43a2780 100644 --- a/lld/COFF/PDB.cpp +++ b/lld/COFF/PDB.cpp @@ -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(C);