coverage: Add debugging flag -Zcoverage-options=no-mir-spans
When set, this flag skips the code that normally extracts coverage spans from MIR statements and terminators. That sometimes makes it easier to debug branch coverage and MC/DC coverage, because the coverage output is less noisy. For internal debugging only. If other code changes would make it hard to keep supporting this flag, remove it.
This commit is contained in:
parent
e23ae72ac7
commit
abc2c702af
10 changed files with 235 additions and 21 deletions
|
@ -71,8 +71,12 @@ fn instrument_function_for_coverage<'tcx>(tcx: TyCtxt<'tcx>, mir_body: &mut mir:
|
|||
|
||||
////////////////////////////////////////////////////
|
||||
// Extract coverage spans and other mapping info from MIR.
|
||||
let extracted_mappings =
|
||||
mappings::extract_all_mapping_info_from_mir(mir_body, &hir_info, &basic_coverage_blocks);
|
||||
let extracted_mappings = mappings::extract_all_mapping_info_from_mir(
|
||||
tcx,
|
||||
mir_body,
|
||||
&hir_info,
|
||||
&basic_coverage_blocks,
|
||||
);
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
// Create an optimized mix of `Counter`s and `Expression`s for the `CoverageGraph`. Ensure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue