Skip to content

Commit

Permalink
Update two tests that need instrumentation support in order to be run
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 22, 2020
1 parent f81c663 commit 3b47280
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
- // MIR for `bar` before InstrumentCoverage
+ // MIR for `bar` after InstrumentCoverage

fn bar() -> bool {
let mut _0: bool; // return place in scope 0 at $DIR/instrument_coverage.rs:18:13: 18:17
+ let mut _1: (); // in scope 0 at $DIR/instrument_coverage.rs:18:1: 20:2

bb0: {
+ StorageLive(_1); // scope 0 at $DIR/instrument_coverage.rs:18:1: 20:2
+ _1 = const std::intrinsics::count_code_region(const 0u32) -> bb2; // scope 0 at $DIR/instrument_coverage.rs:18:1: 20:2
+ _1 = const std::intrinsics::count_code_region(const 0_u32) -> bb2; // scope 0 at $DIR/instrument_coverage.rs:18:1: 20:2
+ // ty::Const
+ // + ty: unsafe extern "rust-intrinsic" fn(u32) {std::intrinsics::count_code_region}
+ // + val: Value(Scalar(<ZST>))
Expand All @@ -21,11 +21,11 @@
+ // + span: $DIR/instrument_coverage.rs:18:1: 18:1
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
+ }
+
+
+ bb1 (cleanup): {
+ resume; // scope 0 at $DIR/instrument_coverage.rs:18:1: 20:2
+ }
+
+
+ bb2: {
+ StorageDead(_1); // scope 0 at $DIR/instrument_coverage.rs:19:5: 19:9
_0 = const true; // scope 0 at $DIR/instrument_coverage.rs:19:5: 19:9
Expand All @@ -38,4 +38,4 @@
return; // scope 0 at $DIR/instrument_coverage.rs:20:2: 20:2
}
}

Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
- // MIR for `main` before InstrumentCoverage
+ // MIR for `main` after InstrumentCoverage

fn main() -> () {
let mut _0: (); // return place in scope 0 at $DIR/instrument_coverage.rs:9:11: 9:11
let mut _1: (); // in scope 0 at $DIR/instrument_coverage.rs:9:1: 15:2
let mut _2: bool; // in scope 0 at $DIR/instrument_coverage.rs:11:12: 11:17
let mut _3: !; // in scope 0 at $DIR/instrument_coverage.rs:11:18: 13:10
+ let mut _4: (); // in scope 0 at $DIR/instrument_coverage.rs:9:1: 15:2

bb0: {
- falseUnwind -> [real: bb1, cleanup: bb2]; // scope 0 at $DIR/instrument_coverage.rs:10:5: 14:6
+ StorageLive(_4); // scope 0 at $DIR/instrument_coverage.rs:9:1: 15:2
+ _4 = const std::intrinsics::count_code_region(const 0u32) -> bb7; // scope 0 at $DIR/instrument_coverage.rs:9:1: 15:2
+ _4 = const std::intrinsics::count_code_region(const 0_u32) -> bb7; // scope 0 at $DIR/instrument_coverage.rs:9:1: 15:2
+ // ty::Const
+ // + ty: unsafe extern "rust-intrinsic" fn(u32) {std::intrinsics::count_code_region}
+ // + val: Value(Scalar(<ZST>))
Expand All @@ -25,7 +25,7 @@
+ // + span: $DIR/instrument_coverage.rs:9:1: 9:1
+ // + literal: Const { ty: u32, val: Value(Scalar(0x00000000)) }
}

bb1: {
StorageLive(_2); // scope 0 at $DIR/instrument_coverage.rs:11:12: 11:17
_2 = const bar() -> [return: bb3, unwind: bb2]; // scope 0 at $DIR/instrument_coverage.rs:11:12: 11:17
Expand All @@ -36,20 +36,20 @@
// + span: $DIR/instrument_coverage.rs:11:12: 11:15
// + literal: Const { ty: fn() -> bool {bar}, val: Value(Scalar(<ZST>)) }
}

bb2 (cleanup): {
resume; // scope 0 at $DIR/instrument_coverage.rs:9:1: 15:2
}

bb3: {
FakeRead(ForMatchedPlace, _2); // scope 0 at $DIR/instrument_coverage.rs:11:12: 11:17
switchInt(_2) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/instrument_coverage.rs:11:9: 13:10
}

bb4: {
falseEdge -> [real: bb6, imaginary: bb5]; // scope 0 at $DIR/instrument_coverage.rs:11:9: 13:10
}

bb5: {
_1 = const (); // scope 0 at $DIR/instrument_coverage.rs:11:9: 13:10
// ty::Const
Expand All @@ -61,7 +61,7 @@
StorageDead(_2); // scope 0 at $DIR/instrument_coverage.rs:14:5: 14:6
goto -> bb0; // scope 0 at $DIR/instrument_coverage.rs:10:5: 14:6
}

bb6: {
_0 = const (); // scope 0 at $DIR/instrument_coverage.rs:12:13: 12:18
// ty::Const
Expand All @@ -73,10 +73,10 @@
StorageDead(_2); // scope 0 at $DIR/instrument_coverage.rs:14:5: 14:6
return; // scope 0 at $DIR/instrument_coverage.rs:15:2: 15:2
+ }
+
+
+ bb7: {
+ StorageDead(_4); // scope 0 at $DIR/instrument_coverage.rs:10:5: 14:6
+ falseUnwind -> [real: bb1, cleanup: bb2]; // scope 0 at $DIR/instrument_coverage.rs:10:5: 14:6
}
}

0 comments on commit 3b47280

Please sign in to comment.