diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2017-09-09 11:02:18 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2017-09-14 10:40:50 -0700 |
| commit | 1cf956f2bae0f3d2b152bb2e06faa16e58b1ea15 (patch) | |
| tree | 673cbf85024fc8cbdb1a5fd31140d7b4964bbd78 /src/librustc_driver/lib.rs | |
| parent | 5dfc84cfa72b405c194228b53c4de3f6474204ec (diff) | |
| download | rust-1cf956f2bae0f3d2b152bb2e06faa16e58b1ea15.tar.gz rust-1cf956f2bae0f3d2b152bb2e06faa16e58b1ea15.zip | |
rustc: Remove `Session::dep_graph`
This commit removes the `dep_graph` field from the `Session` type according to issue #44390. Most of the fallout here was relatively straightforward and the `prepare_session_directory` function was rejiggered a bit to reuse the results in the later-called `load_dep_graph` function. Closes #44390
Diffstat (limited to 'src/librustc_driver/lib.rs')
| -rw-r--r-- | src/librustc_driver/lib.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 099dda17823..522b9eb2232 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -64,7 +64,6 @@ use pretty::{PpMode, UserIdentifiedItem}; use rustc_resolve as resolve; use rustc_save_analysis as save; use rustc_save_analysis::DumpHandler; -use rustc::dep_graph::DepGraph; use rustc::session::{self, config, Session, build_session, CompileResult}; use rustc::session::CompileIncomplete; use rustc::session::config::{Input, PrintRequest, OutputType, ErrorOutputType}; @@ -294,13 +293,12 @@ pub fn run_compiler<'a>(args: &[String], }, }; - let dep_graph = DepGraph::new(sopts.build_dep_graph()); let cstore = Rc::new(CStore::new(box ::MetadataLoader)); let loader = file_loader.unwrap_or(box RealFileLoader); let codemap = Rc::new(CodeMap::with_file_loader(loader, sopts.file_path_mapping())); let mut sess = session::build_session_with_codemap( - sopts, &dep_graph, input_file_path, descriptions, codemap, emitter_dest, + sopts, input_file_path, descriptions, codemap, emitter_dest, ); rustc_trans::init(&sess); rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess)); @@ -318,7 +316,13 @@ pub fn run_compiler<'a>(args: &[String], let plugins = sess.opts.debugging_opts.extra_plugins.clone(); let control = callbacks.build_controller(&sess, &matches); - (driver::compile_input(&sess, &cstore, &input, &odir, &ofile, Some(plugins), &control), + (driver::compile_input(&sess, + &cstore, + &input, + &odir, + &ofile, + Some(plugins), + &control), Some(sess)) } @@ -580,9 +584,7 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { describe_lints(&ls, false); return None; } - let dep_graph = DepGraph::new(sopts.build_dep_graph()); let mut sess = build_session(sopts.clone(), - &dep_graph, None, descriptions.clone()); rustc_trans::init(&sess); |
