Remove the cstore reference from Session in order to prepare encapsulating CrateStore access in tcx.
This commit is contained in:
parent
817e1b81e2
commit
54fa047d92
22 changed files with 135 additions and 85 deletions
|
|
@ -60,7 +60,7 @@ fn basic_sess(sysroot: PathBuf) -> (Session, Rc<CStore>) {
|
|||
let descriptions = Registry::new(&rustc::DIAGNOSTICS);
|
||||
let dep_graph = DepGraph::new(opts.build_dep_graph());
|
||||
let cstore = Rc::new(CStore::new(Box::new(rustc_trans::LlvmMetadataLoader)));
|
||||
let sess = build_session(opts, &dep_graph, None, descriptions, cstore.clone());
|
||||
let sess = build_session(opts, &dep_graph, None, descriptions);
|
||||
rustc_trans::init(&sess);
|
||||
rustc_lint::register_builtins(&mut sess.lint_store.borrow_mut(), Some(&sess));
|
||||
(sess, cstore)
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ extern crate rustc_driver;
|
|||
extern crate syntax;
|
||||
extern crate rustc_errors as errors;
|
||||
|
||||
use rustc::middle::cstore::CrateStore;
|
||||
use rustc::session::Session;
|
||||
use rustc::session::config::{self, Input};
|
||||
use rustc_driver::{driver, CompilerCalls, Compilation};
|
||||
|
|
@ -47,6 +48,7 @@ impl<'a> CompilerCalls<'a> for TestCalls {
|
|||
fn late_callback(&mut self,
|
||||
_: &getopts::Matches,
|
||||
_: &Session,
|
||||
_: &CrateStore,
|
||||
_: &Input,
|
||||
_: &Option<PathBuf>,
|
||||
_: &Option<PathBuf>)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue