diff options
| author | bors <bors@rust-lang.org> | 2015-09-17 08:28:33 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-09-17 08:28:33 +0000 |
| commit | d3fc6e1858f6882bc9bd14641420bf3c4f7ee86b (patch) | |
| tree | c5a0b2441cd8b41f7cb9b4d67b56510e5e89582e | |
| parent | 6c18dd597f409484c668d665bfd144c9c7d37f45 (diff) | |
| parent | 61cb1baab1616134ff77af7ac290ab8f97d6927f (diff) | |
| download | rust-d3fc6e1858f6882bc9bd14641420bf3c4f7ee86b.tar.gz rust-d3fc6e1858f6882bc9bd14641420bf3c4f7ee86b.zip | |
Auto merge of #28454 - GSam:master, r=nrc
This is so that the resolution results can be used after analysis, potentially for tool support
| -rw-r--r-- | src/librustc/session/config.rs | 2 | ||||
| -rw-r--r-- | src/librustc_driver/driver.rs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index ad0eb4d53fe..30f43baabba 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -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 { diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index ec5ceadd066..ce04a5befd9 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -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)); |
