1
Fork 0

coverage: Rename basic_coverage_blocks to just graph

During coverage instrumentation, this variable always holds the coverage graph,
which is a simplified view of the MIR control-flow graph. The new name is
clearer in context, and also shorter.
This commit is contained in:
Zalathar 2024-12-18 13:53:23 +11:00
parent 8700ba1c2c
commit 544809e48a
5 changed files with 60 additions and 92 deletions

View file

@ -22,13 +22,13 @@ pub(crate) struct ExtractedCovspans {
pub(crate) fn extract_covspans_from_mir(
mir_body: &mir::Body<'_>,
hir_info: &ExtractedHirInfo,
basic_coverage_blocks: &CoverageGraph,
graph: &CoverageGraph,
) -> ExtractedCovspans {
let &ExtractedHirInfo { body_span, .. } = hir_info;
let mut covspans = vec![];
for (bcb, bcb_data) in basic_coverage_blocks.iter_enumerated() {
for (bcb, bcb_data) in graph.iter_enumerated() {
bcb_to_initial_coverage_spans(mir_body, body_span, bcb, bcb_data, &mut covspans);
}