Skip to content

Commit

Permalink
Auto merge of #28454 - GSam:master, r=nrc
Browse files Browse the repository at this point in the history
This is so that the resolution results can be used after analysis, potentially for tool support
  • Loading branch information
bors committed Sep 17, 2015
2 parents 6c18dd5 + 61cb1ba commit d3fc6e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
"For every macro invocation, print its name and arguments"),
enable_nonzeroing_move_hints: bool = (false, parse_bool,
"Force nonzeroing move optimization on"),
keep_mtwt_tables: bool = (false, parse_bool,
"Don't clear the resolution tables after analysis"),
}

pub fn default_lib_output() -> CrateType {
Expand Down
4 changes: 3 additions & 1 deletion src/librustc_driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,9 @@ pub fn phase_3_run_analysis_passes<'tcx, F, R>(sess: Session,
|| resolve::resolve_crate(&sess, &ast_map, make_glob_map));

// Discard MTWT tables that aren't required past resolution.
syntax::ext::mtwt::clear_tables();
if !sess.opts.debugging_opts.keep_mtwt_tables {
syntax::ext::mtwt::clear_tables();
}

let named_region_map = time(time_passes, "lifetime resolution",
|| middle::resolve_lifetime::krate(&sess, krate, &def_map));
Expand Down

0 comments on commit d3fc6e1

Please sign in to comment.