-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #115586 - Zalathar:query, r=cjgillot
coverage: Simplify the `coverageinfo` query The `coverageinfo` query walks through a `mir::Body`'s statements to find the total number of coverage counter IDs and coverage expression IDs that have been used, as this information is needed by coverage codegen. This PR makes 3 nice simplifications to that query: - Extract a common iterator over coverage statements, shared by both coverage-related queries - Simplify the query's visitor from two passes to just one pass - Explicitly track the highest seen IDs in the visitor, and only convert to a count right at the end I also updated some related comments. Some had been invalidated by these changes, while others had already been invalidated by previous coverage changes.
- Loading branch information
Showing
1 changed file
with
51 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters