diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-06-05 21:29:18 +0200 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2015-07-28 16:12:32 +0200 |
| commit | 20aa27b7bca3504f6a7672cc88e17a9c286cec4b (patch) | |
| tree | 9dc97befc349efaab4ab06259aad8151bf85ec75 | |
| parent | 9ef61f1ee0690b4fb04192a283113901d5764b32 (diff) | |
| download | rust-20aa27b7bca3504f6a7672cc88e17a9c286cec4b.tar.gz rust-20aa27b7bca3504f6a7672cc88e17a9c286cec4b.zip | |
debugflag to turn off nonzeroing move hint optimization.
(already thumbs-upped pre-rebase by nikomatsakis)
| -rw-r--r-- | src/librustc/session/config.rs | 2 | ||||
| -rw-r--r-- | src/librustc/session/mod.rs | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index c6ce3a22d9b..fba8fad203b 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -594,6 +594,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "Force drop flag checks on or off"), trace_macros: bool = (false, parse_bool, "For every macro invocation, print its name and arguments"), + disable_nonzeroing_move_hints: bool = (false, parse_bool, + "Force nonzeroing move optimization off"), } pub fn default_lib_output() -> CrateType { diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 2cdd2ee2f03..efd46d35f56 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -272,6 +272,9 @@ impl Session { pub fn print_enum_sizes(&self) -> bool { self.opts.debugging_opts.print_enum_sizes } + pub fn nonzeroing_move_hints(&self) -> bool { + !self.opts.debugging_opts.disable_nonzeroing_move_hints + } pub fn sysroot<'a>(&'a self) -> &'a Path { match self.opts.maybe_sysroot { Some (ref sysroot) => sysroot, |
