Allow cranelift to handle atomic pointers

This commit is contained in:
oli 2020-11-29 14:56:19 +00:00
parent 392ea29757
commit 41f988e6ae

View File

@ -146,12 +146,12 @@ macro atomic_minmax($fx:expr, $cc:expr, <$T:ident> ($ptr:ident, $src:ident) -> $
macro validate_atomic_type($fx:ident, $intrinsic:ident, $span:ident, $ty:expr) { macro validate_atomic_type($fx:ident, $intrinsic:ident, $span:ident, $ty:expr) {
match $ty.kind() { match $ty.kind() {
ty::Uint(_) | ty::Int(_) => {} ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {}
_ => { _ => {
$fx.tcx.sess.span_err( $fx.tcx.sess.span_err(
$span, $span,
&format!( &format!(
"`{}` intrinsic: expected basic integer type, found `{:?}`", "`{}` intrinsic: expected basic integer or raw pointer type, found `{:?}`",
$intrinsic, $ty $intrinsic, $ty
), ),
); );