diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-02 09:22:18 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-02 09:22:18 -0800 |
| commit | b9a26bf4b1b98beeaaf4dae16c4b590aec87b54b (patch) | |
| tree | b01e699db5029ad17f0b18dd42095bc33bc90369 /src/libsyntax/feature_gate.rs | |
| parent | 656d5bbb92a7f811c0ab172b2bda484b1c890924 (diff) | |
| parent | f1b64017d044018c649492b75708429749408ed0 (diff) | |
| download | rust-b9a26bf4b1b98beeaaf4dae16c4b590aec87b54b.tar.gz rust-b9a26bf4b1b98beeaaf4dae16c4b590aec87b54b.zip | |
rollup merge of #20334: nagisa/ffi-llvm
Fixes #20313 r? @huonw
Diffstat (limited to 'src/libsyntax/feature_gate.rs')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index b2c2d7eb626..035b748a7db 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -56,6 +56,7 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[ ("simd", Active), ("default_type_params", Active), ("quote", Active), + ("link_llvm_intrinsics", Active), ("linkage", Active), ("struct_inherit", Removed), @@ -327,6 +328,16 @@ impl<'a, 'v> Visitor<'v> for PostExpansionVisitor<'a> { "the `linkage` attribute is experimental \ and not portable across platforms") } + + let links_to_llvm = match attr::first_attr_value_str_by_name(i.attrs[], "link_name") { + Some(val) => val.get().starts_with("llvm."), + _ => false + }; + if links_to_llvm { + self.gate_feature("link_llvm_intrinsics", i.span, + "linking to LLVM intrinsics is experimental"); + } + visit::walk_foreign_item(self, i) } |
