rust/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
Zalathar 3920e07f0b Make coverage counter IDs count up from 0, not 1
Operand types are now tracked explicitly, so there is no need to reserve ID 0
for the special always-zero counter.

As part of the renumbering, this change fixes an off-by-one error in the way
counters were counted by the `coverageinfo` query. As a result, functions
should now have exactly the number of counters they actually need, instead of
always having an extra counter that is never used.
2023-08-01 11:29:55 +10:00

14 lines
293 B
Diff

- // MIR for `bar` before InstrumentCoverage
+ // MIR for `bar` after InstrumentCoverage
fn bar() -> bool {
let mut _0: bool;
bb0: {
+ Coverage::Counter(0) for /the/src/instrument_coverage.rs:20:1 - 22:2;
_0 = const true;
return;
}
}