2020-06-10 11:54:02 -05:00
|
|
|
- // MIR for `main` before InstrumentCoverage
|
|
|
|
+ // MIR for `main` after InstrumentCoverage
|
|
|
|
|
|
|
|
fn main() -> () {
|
2023-06-06 08:47:00 -05:00
|
|
|
let mut _0: ();
|
|
|
|
let mut _1: ();
|
|
|
|
let mut _2: bool;
|
|
|
|
let mut _3: !;
|
2020-06-10 11:54:02 -05:00
|
|
|
|
2023-09-12 22:20:13 -05:00
|
|
|
+ coverage ExpressionId(0) => Expression { lhs: Counter(0), op: Add, rhs: Counter(1) };
|
|
|
|
+ coverage ExpressionId(1) => Expression { lhs: Expression(0), op: Subtract, rhs: Counter(1) };
|
2023-10-16 12:36:39 -05:00
|
|
|
+ coverage Counter(0) => /the/src/instrument_coverage.rs:12:1 - 12:11;
|
|
|
|
+ coverage Expression(0) => /the/src/instrument_coverage.rs:13:5 - 14:17;
|
|
|
|
+ coverage Expression(1) => /the/src/instrument_coverage.rs:15:13 - 15:18;
|
|
|
|
+ coverage Expression(1) => /the/src/instrument_coverage.rs:18:1 - 18:2;
|
|
|
|
+ coverage Counter(1) => /the/src/instrument_coverage.rs:16:10 - 16:11;
|
2023-09-12 21:51:43 -05:00
|
|
|
+
|
2020-06-10 11:54:02 -05:00
|
|
|
bb0: {
|
2023-09-12 21:51:43 -05:00
|
|
|
+ Coverage::CounterIncrement(0);
|
2023-06-06 08:47:00 -05:00
|
|
|
goto -> bb1;
|
2020-06-10 11:54:02 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-09-12 22:20:13 -05:00
|
|
|
+ Coverage::ExpressionUsed(0);
|
2023-06-06 08:47:00 -05:00
|
|
|
falseUnwind -> [real: bb2, unwind: bb6];
|
2021-09-17 19:00:00 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2023-06-06 08:47:00 -05:00
|
|
|
StorageLive(_2);
|
|
|
|
_2 = bar() -> [return: bb3, unwind: bb6];
|
2020-06-10 11:54:02 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb3: {
|
2023-06-06 08:47:00 -05:00
|
|
|
switchInt(move _2) -> [0: bb5, otherwise: bb4];
|
2020-06-10 11:54:02 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb4: {
|
2023-09-12 22:20:13 -05:00
|
|
|
+ Coverage::ExpressionUsed(1);
|
2023-06-06 08:47:00 -05:00
|
|
|
_0 = const ();
|
|
|
|
StorageDead(_2);
|
|
|
|
return;
|
2020-06-10 11:54:02 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb5: {
|
2023-09-12 21:51:43 -05:00
|
|
|
+ Coverage::CounterIncrement(1);
|
2023-06-06 08:47:00 -05:00
|
|
|
_1 = const ();
|
|
|
|
StorageDead(_2);
|
|
|
|
goto -> bb1;
|
2020-06-10 11:54:02 -05:00
|
|
|
}
|
|
|
|
|
2021-09-17 19:00:00 -05:00
|
|
|
bb6 (cleanup): {
|
2023-06-06 08:47:00 -05:00
|
|
|
resume;
|
2020-10-04 06:57:53 -05:00
|
|
|
}
|
2020-06-10 11:54:02 -05:00
|
|
|
}
|
|
|
|
|