Do not require the DefPathTable to construct the on-disk cache.
This commit is contained in:
parent
e4a6032706
commit
aeb050da9f
4 changed files with 14 additions and 39 deletions
|
@ -1,7 +1,6 @@
|
|||
//! Code to save/load the dep-graph from files.
|
||||
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_hir::definitions::DefPathTable;
|
||||
use rustc_middle::dep_graph::{SerializedDepGraph, WorkProduct, WorkProductId};
|
||||
use rustc_middle::ty::query::OnDiskCache;
|
||||
use rustc_serialize::opaque::Decoder;
|
||||
|
@ -196,10 +195,7 @@ pub fn load_dep_graph(sess: &Session) -> DepGraphFuture {
|
|||
/// If we are not in incremental compilation mode, returns `None`.
|
||||
/// Otherwise, tries to load the query result cache from disk,
|
||||
/// creating an empty cache if it could not be loaded.
|
||||
pub fn load_query_result_cache<'a>(
|
||||
sess: &'a Session,
|
||||
def_path_table: &DefPathTable,
|
||||
) -> Option<OnDiskCache<'a>> {
|
||||
pub fn load_query_result_cache<'a>(sess: &'a Session) -> Option<OnDiskCache<'a>> {
|
||||
if sess.opts.incremental.is_none() {
|
||||
return None;
|
||||
}
|
||||
|
@ -212,7 +208,7 @@ pub fn load_query_result_cache<'a>(
|
|||
sess.is_nightly_build(),
|
||||
) {
|
||||
LoadResult::Ok { data: (bytes, start_pos) } => {
|
||||
Some(OnDiskCache::new(sess, bytes, start_pos, def_path_table))
|
||||
Some(OnDiskCache::new(sess, bytes, start_pos))
|
||||
}
|
||||
_ => Some(OnDiskCache::new_empty(sess.source_map())),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue