mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
also handle abort intrinsic with new machine hook
This commit is contained in:
parent
8a8870fbae
commit
911c75ff5f
@ -103,6 +103,10 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
||||
self.write_scalar(location.ptr, dest)?;
|
||||
}
|
||||
|
||||
sym::abort => {
|
||||
M::abort(self)?;
|
||||
}
|
||||
|
||||
sym::min_align_of
|
||||
| sym::pref_align_of
|
||||
| sym::needs_drop
|
||||
|
@ -171,7 +171,7 @@ pub trait Machine<'mir, 'tcx>: Sized {
|
||||
) -> InterpResult<'tcx>;
|
||||
|
||||
/// Called to evaluate `Abort` MIR terminator.
|
||||
fn abort(_ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx> {
|
||||
fn abort(_ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx, !> {
|
||||
throw_unsup_format!("aborting execution is not supported");
|
||||
}
|
||||
|
||||
|
@ -120,6 +120,7 @@ symbols! {
|
||||
abi_unadjusted,
|
||||
abi_vectorcall,
|
||||
abi_x86_interrupt,
|
||||
abort,
|
||||
aborts,
|
||||
address,
|
||||
add_with_overflow,
|
||||
|
Loading…
Reference in New Issue
Block a user