1
Fork 0

Move mir_opt_level getter into Options

This commit is contained in:
Dylan MacKenzie 2021-11-28 17:54:42 -08:00
parent ff23ad3179
commit 386b1c5f57
2 changed files with 9 additions and 4 deletions

View file

@ -562,10 +562,7 @@ impl Session {
self.opts.debugging_opts.binary_dep_depinfo
}
pub fn mir_opt_level(&self) -> usize {
self.opts
.debugging_opts
.mir_opt_level
.unwrap_or_else(|| if self.opts.optimize != config::OptLevel::No { 2 } else { 1 })
self.opts.mir_opt_level()
}
/// Gets the features enabled for the current compilation session.