Rollup merge of #64497 - nnethercote:fix-64339, r=petrochenkov

Don't print the "total" `-Ztime-passes` output if `--prints=...` is also given

Fixes #64339.
This commit is contained in:
Mazdak Farrokhzad 2019-09-16 17:09:43 +02:00 committed by GitHub
commit acbbcda399
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,8 +134,11 @@ pub struct TimePassesCallbacks {
impl Callbacks for TimePassesCallbacks {
fn config(&mut self, config: &mut interface::Config) {
// If a --prints=... option has been given, we don't print the "total"
// time because it will mess up the --prints output. See #64339.
self.time_passes =
config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time;
config.opts.prints.is_empty() &&
(config.opts.debugging_opts.time_passes || config.opts.debugging_opts.time);
}
}