also handle abort intrinsic with new machine hook

This commit is contained in:
Ralf Jung 2020-03-09 20:18:48 +01:00
parent 8a8870fbae
commit 911c75ff5f
3 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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");
}

View File

@ -120,6 +120,7 @@ symbols! {
abi_unadjusted,
abi_vectorcall,
abi_x86_interrupt,
abort,
aborts,
address,
add_with_overflow,