Skip to content

Commit e238eb6

Browse files
authored
Rollup merge of #69437 - RalfJung:miri-no-codegen, r=ecstatic-morse
no more codegen for miri_start_panic With rust-lang/miri#1136 landed, we don't generate code any more for crates that will be run by Miri. So the LLVM backend does not have to implement the `miri_start_panic` intrinsic any more. Cc @Aaron1011
2 parents 726a025 + 4e86753 commit e238eb6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/librustc_codegen_ssa/mir/block.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -515,12 +515,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
515515
return;
516516
}
517517

518-
// For normal codegen, this Miri-specific intrinsic is just a NOP.
518+
// For normal codegen, this Miri-specific intrinsic should never occur.
519519
if intrinsic == Some("miri_start_panic") {
520-
let target = destination.as_ref().unwrap().1;
521-
helper.maybe_sideeffect(self.mir, &mut bx, &[target]);
522-
helper.funclet_br(self, &mut bx, target);
523-
return;
520+
bug!("`miri_start_panic` should never end up in compiled code");
524521
}
525522

526523
// Emit a panic or a no-op for `panic_if_uninhabited`.

0 commit comments

Comments
 (0)