1
Fork 0

coverage: Store expression data in function coverage info

Even though expression details are now stored in the info structure, we still
need to inject `ExpressionUsed` statements into MIR, because if one is missing
during codegen then we know that it was optimized out and we can remap all of
its associated code regions to zero.
This commit is contained in:
Zalathar 2023-09-13 13:20:13 +10:00
parent 7d38f4a611
commit 13b2d604ec
9 changed files with 90 additions and 173 deletions

View file

@ -656,7 +656,7 @@ fn test_make_bcb_counters() {
coverage_counters
.make_bcb_counters(&mut basic_coverage_blocks, bcb_has_coverage_spans)
.expect("should be Ok");
assert_eq!(coverage_counters.intermediate_expressions.len(), 0);
assert_eq!(coverage_counters.num_expressions(), 0);
let_bcb!(1);
assert_eq!(