mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-07 12:47:29 +00:00

Even though the coverage graph itself is no longer available during codegen, its nodes can still be used as opaque IDs.
56 lines
1.7 KiB
Diff
56 lines
1.7 KiB
Diff
- // MIR for `main` before CleanupPostBorrowck
|
|
+ // MIR for `main` after CleanupPostBorrowck
|
|
|
|
fn main() -> () {
|
|
let mut _0: ();
|
|
let mut _1: bool;
|
|
|
|
coverage branch { true: BlockMarkerId(0), false: BlockMarkerId(1) } => $DIR/instrument_coverage_cleanup.rs:14:8: 14:36 (#0)
|
|
|
|
coverage body span: $DIR/instrument_coverage_cleanup.rs:13:11: 15:2 (#0)
|
|
coverage ExpressionId(0) => Expression { lhs: Counter(0), op: Subtract, rhs: Counter(1) };
|
|
coverage Code { bcb: bcb0 } => $DIR/instrument_coverage_cleanup.rs:13:1: 14:36 (#0);
|
|
coverage Code { bcb: bcb3 } => $DIR/instrument_coverage_cleanup.rs:14:37: 14:39 (#0);
|
|
coverage Code { bcb: bcb1 } => $DIR/instrument_coverage_cleanup.rs:14:39: 14:39 (#0);
|
|
coverage Code { bcb: bcb2 } => $DIR/instrument_coverage_cleanup.rs:15:2: 15:2 (#0);
|
|
coverage Branch { true_bcb: bcb3, false_bcb: bcb1 } => $DIR/instrument_coverage_cleanup.rs:14:8: 14:36 (#0);
|
|
|
|
bb0: {
|
|
Coverage::CounterIncrement(0);
|
|
- Coverage::SpanMarker;
|
|
+ nop;
|
|
StorageLive(_1);
|
|
_1 = std::hint::black_box::<bool>(const true) -> [return: bb1, unwind: bb5];
|
|
}
|
|
|
|
bb1: {
|
|
switchInt(move _1) -> [0: bb3, otherwise: bb2];
|
|
}
|
|
|
|
bb2: {
|
|
Coverage::CounterIncrement(1);
|
|
- Coverage::BlockMarker(1);
|
|
+ nop;
|
|
_0 = const ();
|
|
goto -> bb4;
|
|
}
|
|
|
|
bb3: {
|
|
Coverage::ExpressionUsed(0);
|
|
- Coverage::BlockMarker(0);
|
|
+ nop;
|
|
_0 = const ();
|
|
goto -> bb4;
|
|
}
|
|
|
|
bb4: {
|
|
StorageDead(_1);
|
|
return;
|
|
}
|
|
|
|
bb5 (cleanup): {
|
|
resume;
|
|
}
|
|
}
|
|
|