coverage: CoverageIdsInfo::mcdc_bitmap_bytes
is never needed
This code for recalculating `mcdc_bitmap_bytes` doesn't provide any benefit, because its result won't have changed from the value in `FunctionCoverageInfo` that was computed during the MIR instrumentation pass.
This commit is contained in:
parent
fba5f44bd8
commit
bfadc3a9b9
3 changed files with 2 additions and 21 deletions
|
@ -207,13 +207,8 @@ impl<'tcx> CoverageInfoBuilderMethods<'tcx> for Builder<'_, '_, 'tcx> {
|
|||
let cond_bitmap = coverage_context
|
||||
.try_get_mcdc_condition_bitmap(&instance, decision_depth)
|
||||
.expect("mcdc cond bitmap should have been allocated for merging into the global bitmap");
|
||||
let bitmap_bytes = bx.tcx().coverage_ids_info(instance.def).mcdc_bitmap_bytes;
|
||||
let bitmap_bytes = function_coverage_info.mcdc_bitmap_bytes;
|
||||
assert!(bitmap_idx < bitmap_bytes, "bitmap index of the decision out of range");
|
||||
assert!(
|
||||
bitmap_bytes <= function_coverage_info.mcdc_bitmap_bytes,
|
||||
"bitmap length disagreement: query says {bitmap_bytes} but function info only has {}",
|
||||
function_coverage_info.mcdc_bitmap_bytes
|
||||
);
|
||||
|
||||
let fn_name = bx.get_pgo_func_name_var(instance);
|
||||
let hash = bx.const_u64(function_coverage_info.function_source_hash);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue