Skip to content

Commit

Permalink
Auto merge of #62674 - RalfJung:miri-abi, r=eddyb
Browse files Browse the repository at this point in the history
RustIntrinsic and PlatformIntrinsic are also the same ABI as Rust

r? @eddyb
  • Loading branch information
bors committed Jul 15, 2019
2 parents e452e29 + 6c293d8 commit 9bb855c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/librustc_mir/interpret/terminator.rs
Expand Up @@ -280,8 +280,13 @@ impl<'mir, 'tcx, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
_ => bug!("unexpected callee ty: {:?}", instance_ty),
}
};
// Rust and RustCall are compatible
let normalize_abi = |abi| if abi == Abi::RustCall { Abi::Rust } else { abi };
let normalize_abi = |abi| match abi {
Abi::Rust | Abi::RustCall | Abi::RustIntrinsic | Abi::PlatformIntrinsic =>
// These are all the same ABI, really.
Abi::Rust,
abi =>
abi,
};
if normalize_abi(caller_abi) != normalize_abi(callee_abi) {
return err!(FunctionAbiMismatch(caller_abi, callee_abi));
}
Expand Down

0 comments on commit 9bb855c

Please sign in to comment.