1
Fork 0

coverage: Replace max_decision_depth with num_condition_bitmaps

This clearly distinguishes individual decision-depth indices from the total
number of condition bitmaps to allocate.
This commit is contained in:
Zalathar 2024-04-30 17:54:06 +10:00
parent 0b3a47900e
commit de972b7321
3 changed files with 5 additions and 5 deletions

View file

@ -110,7 +110,7 @@ impl<'tcx> CoverageInfoBuilderMethods<'tcx> for Builder<'_, '_, 'tcx> {
// Create pointers named `mcdc.addr.{i}` to stack-allocated condition bitmaps.
let mut cond_bitmaps = vec![];
for i in 0..=function_coverage_info.mcdc_max_decision_depth {
for i in 0..function_coverage_info.mcdc_num_condition_bitmaps {
// MC/DC intrinsics will perform loads/stores that use the ABI default
// alignment for i32, so our variable declaration should match.
let align = self.tcx.data_layout.i32_align.abi;