coverage: Split off mappings.rs
from spans.rs
and from_mir.rs
This commit is contained in:
parent
7d1c6af3dc
commit
ba87e5bb3e
4 changed files with 283 additions and 275 deletions
|
@ -2,13 +2,14 @@ pub mod query;
|
|||
|
||||
mod counters;
|
||||
mod graph;
|
||||
mod mappings;
|
||||
mod spans;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
|
||||
use self::counters::{CounterIncrementSite, CoverageCounters};
|
||||
use self::graph::{BasicCoverageBlock, CoverageGraph};
|
||||
use self::spans::{BcbBranchPair, BcbMapping, BcbMappingKind, CoverageSpans};
|
||||
use self::mappings::{BcbBranchPair, BcbMapping, BcbMappingKind, CoverageSpans};
|
||||
|
||||
use crate::MirPass;
|
||||
|
||||
|
@ -70,7 +71,7 @@ fn instrument_function_for_coverage<'tcx>(tcx: TyCtxt<'tcx>, mir_body: &mut mir:
|
|||
////////////////////////////////////////////////////
|
||||
// Compute coverage spans from the `CoverageGraph`.
|
||||
let Some(coverage_spans) =
|
||||
spans::generate_coverage_spans(mir_body, &hir_info, &basic_coverage_blocks)
|
||||
mappings::generate_coverage_spans(mir_body, &hir_info, &basic_coverage_blocks)
|
||||
else {
|
||||
// No relevant spans were found in MIR, so skip instrumenting this function.
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue