about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-17 10:58:43 +0000
committerbors <bors@rust-lang.org>2015-01-17 10:58:43 +0000
commit89c4e3792ddc5b45706ea0e919806a248f7a87c3 (patch)
tree31af99a5d3e3fe2cbc72ea7a7a168a796327c322 /src/libsyntax
parent3e6eaeb69ff729096253670aba752c03225113bc (diff)
parentc8e0e9549d4327c54d9eb5fd0de5e23312c34fe9 (diff)
downloadrust-89c4e3792ddc5b45706ea0e919806a248f7a87c3.tar.gz
rust-89c4e3792ddc5b45706ea0e919806a248f7a87c3.zip
auto merge of #21233 : huonw/rust/simd-size, r=Aatch
This stops the compiler ICEing on the use of SIMD types in FFI signatures. It emits correct code for LLVM intrinsics, but I am quite unsure about the ABI handling in general so I've added a new feature gate `simd_ffi` to try to ensure people don't use it without realising there's a non-trivial risk of codegen brokenness.

Closes #20043.
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 8929bbe0232..9231d4ad659 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -72,6 +72,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
     ("slicing_syntax", Active),
     ("box_syntax", Active),
     ("on_unimplemented", Active),
+    ("simd_ffi", Active),
 
     ("if_let", Accepted),
     ("while_let", Accepted),
@@ -128,6 +129,7 @@ pub struct Features {
     pub visible_private_types: bool,
     pub quote: bool,
     pub old_orphan_check: bool,
+    pub simd_ffi: bool,
 }
 
 impl Features {
@@ -139,6 +141,7 @@ impl Features {
             visible_private_types: false,
             quote: false,
             old_orphan_check: false,
+            simd_ffi: false,
         }
     }
 }
@@ -524,6 +527,7 @@ fn check_crate_inner<F>(cm: &CodeMap, span_handler: &SpanHandler, krate: &ast::C
         visible_private_types: cx.has_feature("visible_private_types"),
         quote: cx.has_feature("quote"),
         old_orphan_check: cx.has_feature("old_orphan_check"),
+        simd_ffi: cx.has_feature("simd_ffi"),
     },
     unknown_features)
 }