Don't erase empty indices in DWARF reader

The DWARF reader has some code to remove empty indices.  However, I
think this code has been obsolete since some earlier changes to
parallel_for_each.  This patch removes this code.
This commit is contained in:
Tom Tromey
2022-12-14 07:20:49 -07:00
parent 63078a0498
commit 1a6191f1a6

View File

@ -7170,16 +7170,6 @@ dwarf2_build_psymtabs_hard (dwarf2_per_objfile *per_objfile)
print_tu_stats (per_objfile);
indexes.push_back (index_storage.release ());
/* Remove any NULL entries. This might happen if parallel-for
decides to throttle the number of threads that were used. */
indexes.erase
(std::remove_if (indexes.begin (),
indexes.end (),
[] (const std::unique_ptr<cooked_index> &entry)
{
return entry == nullptr;
}),
indexes.end ());
indexes.shrink_to_fit ();
cooked_index_vector *vec = new cooked_index_vector (std::move (indexes));