From 041eb6fef6ac824f5a903be971067b269fcead1f Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 20 Apr 2018 18:36:51 +0000 Subject: [PATCH] [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 --- lld/COFF/PDB.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/lld/COFF/PDB.cpp b/lld/COFF/PDB.cpp index a3548ada7495..43a2780d1ec9 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);