about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2016-12-19 20:09:51 -0700
committerMark Simulacrum <mark.simulacrum@gmail.com>2016-12-20 20:04:45 -0700
commit654131cb5376514eb355f40837790afca7fa3e7d (patch)
tree010a757103b61be6ffa3fa82948de246acf92581
parent07cf2a90059f46bc00586eebd0737e7432b83734 (diff)
Add unreachable() after calls to eh_unwind_resume.
-rw-r--r--src/librustc_trans/cleanup.rs1
-rw-r--r--src/librustc_trans/mir/block.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/librustc_trans/cleanup.rs b/src/librustc_trans/cleanup.rs
index 21eccb101f7..5bf8aecf667 100644
--- a/src/librustc_trans/cleanup.rs
+++ b/src/librustc_trans/cleanup.rs
@@ -93,6 +93,7 @@ impl<'tcx> DropValue<'tcx> {
             } else {
                 let exc_ptr = resume_bcx.extract_value(lp, 0);
                 resume_bcx.call(fcx.eh_unwind_resume().reify(fcx.ccx), &[exc_ptr], None);
+                resume_bcx.unreachable();
             }
             UnwindKind::LandingPad
         };
diff --git a/src/librustc_trans/mir/block.rs b/src/librustc_trans/mir/block.rs
index 2b408e3170e..e665c7a2307 100644
--- a/src/librustc_trans/mir/block.rs
+++ b/src/librustc_trans/mir/block.rs
@@ -130,6 +130,7 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
                             &[exc_ptr],
                             cleanup_bundle,
                         );
+                        bcx.unreachable();
                     }
                 }
             }