1
Fork 0

no more codegen for miri_start_panic

This commit is contained in:
Ralf Jung 2020-02-24 16:42:26 +01:00
parent 79cd224e75
commit 4e867535f3

View file

@ -515,12 +515,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
return; return;
} }
// For normal codegen, this Miri-specific intrinsic is just a NOP. // For normal codegen, this Miri-specific intrinsic should never occur.
if intrinsic == Some("miri_start_panic") { if intrinsic == Some("miri_start_panic") {
let target = destination.as_ref().unwrap().1; bug!("`miri_start_panic` should never end up in compiled code");
helper.maybe_sideeffect(self.mir, &mut bx, &[target]);
helper.funclet_br(self, &mut bx, target);
return;
} }
// Emit a panic or a no-op for `panic_if_uninhabited`. // Emit a panic or a no-op for `panic_if_uninhabited`.