]> git.lizzy.rs Git - rust.git/commitdiff
Allow cranelift to handle atomic pointers
authoroli <github35764891676564198441@oli-obk.de>
Sun, 29 Nov 2020 14:56:19 +0000 (14:56 +0000)
committeroli <github35764891676564198441@oli-obk.de>
Sun, 29 Nov 2020 14:56:19 +0000 (14:56 +0000)
src/intrinsics/mod.rs

index ab16fabd348a540d04a12b0f2bcdfb60dae441c0..e5482187a731d281829dfec9f03871b5325ead05 100644 (file)
 
 macro validate_atomic_type($fx:ident, $intrinsic:ident, $span:ident, $ty:expr) {
     match $ty.kind() {
-        ty::Uint(_) | ty::Int(_) => {}
+        ty::Uint(_) | ty::Int(_) | ty::RawPtr(..) => {}
         _ => {
             $fx.tcx.sess.span_err(
                 $span,
                 &format!(
-                    "`{}` intrinsic: expected basic integer type, found `{:?}`",
+                    "`{}` intrinsic: expected basic integer or raw pointer type, found `{:?}`",
                     $intrinsic, $ty
                 ),
             );