Index: lld/COFF/PDB.cpp =================================================================== --- lld/COFF/PDB.cpp +++ lld/COFF/PDB.cpp @@ -1465,8 +1465,10 @@ pdb::DbiModuleDescriptorBuilder &mod, OutputSection &os, BumpPtrAllocator &allocator) { - // If there's a section, there's at least one chunk - assert(!sec->chunks.empty()); + // Skip empty sections + if (!sec || sec->chunks.empty()) + return; + const Chunk *firstChunk = *sec->chunks.begin(); const Chunk *lastChunk = *sec->chunks.rbegin();