summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mir-opt/building/custom/enums.switch_bool.built.after.mir')
-rw-r--r--tests/mir-opt/building/custom/enums.switch_bool.built.after.mir19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir b/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir
new file mode 100644
index 000000000..95c57d2dc
--- /dev/null
+++ b/tests/mir-opt/building/custom/enums.switch_bool.built.after.mir
@@ -0,0 +1,19 @@
+// MIR for `switch_bool` after built
+
+fn switch_bool(_1: bool) -> u32 {
+ let mut _0: u32; // return place in scope 0 at $DIR/enums.rs:+0:32: +0:35
+
+ bb0: {
+ switchInt(_1) -> [1: bb1, 0: bb2, otherwise: bb2]; // scope 0 at $DIR/enums.rs:+3:13: +7:14
+ }
+
+ bb1: {
+ _0 = const 5_u32; // scope 0 at $DIR/enums.rs:+11:13: +11:20
+ return; // scope 0 at $DIR/enums.rs:+12:13: +12:21
+ }
+
+ bb2: {
+ _0 = const 10_u32; // scope 0 at $DIR/enums.rs:+16:13: +16:21
+ return; // scope 0 at $DIR/enums.rs:+17:13: +17:21
+ }
+}