Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in
mark_code_coverage_dead_code_cgus
.
The comment says "Find the smallest CGU that has exported symbols and put the dead function stubs in that CGU". But the code sorts the CGUs by size (smallest first) and then searches them in reverse order, which means it will find the *largest* CGU that has exported symbols. The erroneous code was introduced in rust-lang#92142. This commit changes it to use a simpler search, avoiding the sort, and fixes the bug in the process.
- Loading branch information