diff options
| author | Simonas Kazlauskas <git@kazlauskas.me> | 2018-10-27 15:29:06 +0300 |
|---|---|---|
| committer | Simonas Kazlauskas <git@kazlauskas.me> | 2019-01-24 20:13:50 +0200 |
| commit | f38d0da89389c45067d37ba15e783c024088a09a (patch) | |
| tree | 75260423c9caa95661d32a8bbdef5888f8591fa4 /src/librustc/hir | |
| parent | 095b44c83b540bb4dbf74be1cae604f4bae87989 (diff) | |
| download | rust-f38d0da89389c45067d37ba15e783c024088a09a.tar.gz rust-f38d0da89389c45067d37ba15e783c024088a09a.zip | |
Implement optimize(size) and optimize(speed)
Diffstat (limited to 'src/librustc/hir')
| -rw-r--r-- | src/librustc/hir/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/librustc/hir/mod.rs b/src/librustc/hir/mod.rs index b58b1d359f9..657e6e5dcde 100644 --- a/src/librustc/hir/mod.rs +++ b/src/librustc/hir/mod.rs @@ -21,7 +21,7 @@ use syntax::source_map::Spanned; use rustc_target::spec::abi::Abi; use syntax::ast::{self, CrateSugar, Ident, Name, NodeId, DUMMY_NODE_ID, AsmDialect}; use syntax::ast::{Attribute, Label, Lit, StrStyle, FloatTy, IntTy, UintTy}; -use syntax::attr::InlineAttr; +use syntax::attr::{InlineAttr, OptimizeAttr}; use syntax::ext::hygiene::SyntaxContext; use syntax::ptr::P; use syntax::symbol::{Symbol, keywords}; @@ -2416,6 +2416,8 @@ pub struct CodegenFnAttrs { pub flags: CodegenFnAttrFlags, /// Parsed representation of the `#[inline]` attribute pub inline: InlineAttr, + /// Parsed representation of the `#[optimize]` attribute + pub optimize: OptimizeAttr, /// The `#[export_name = "..."]` attribute, indicating a custom symbol a /// function should be exported under pub export_name: Option<Symbol>, @@ -2476,6 +2478,7 @@ impl CodegenFnAttrs { CodegenFnAttrs { flags: CodegenFnAttrFlags::empty(), inline: InlineAttr::None, + optimize: OptimizeAttr::None, export_name: None, link_name: None, target_features: vec![], |
