debugflag to turn off nonzeroing move hint optimization.

(already thumbs-upped pre-rebase by nikomatsakis)
This commit is contained in:
Felix S. Klock II 2015-06-05 21:29:18 +02:00
parent 9ef61f1ee0
commit 20aa27b7bc
2 changed files with 5 additions and 0 deletions

View File

@ -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 {

View File

@ -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,