Move some code from Compiler::enter to GlobalCtxt::finish
This commit is contained in:
parent
bec24a25cd
commit
8e9bbc899c
11 changed files with 64 additions and 32 deletions
|
@ -16,8 +16,15 @@ mod persist;
|
|||
|
||||
pub use persist::{
|
||||
LoadResult, copy_cgu_workproduct_to_incr_comp_cache_dir, finalize_session_directory,
|
||||
in_incr_comp_dir, in_incr_comp_dir_sess, load_query_result_cache, save_dep_graph,
|
||||
save_work_product_index, setup_dep_graph,
|
||||
in_incr_comp_dir, in_incr_comp_dir_sess, load_query_result_cache, save_work_product_index,
|
||||
setup_dep_graph,
|
||||
};
|
||||
use rustc_middle::util::Providers;
|
||||
|
||||
#[allow(missing_docs)]
|
||||
pub fn provide(providers: &mut Providers) {
|
||||
providers.hooks.save_dep_graph =
|
||||
|tcx| tcx.sess.time("serialize_dep_graph", || persist::save_dep_graph(tcx.tcx));
|
||||
}
|
||||
|
||||
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
|
||||
|
|
|
@ -12,5 +12,6 @@ mod work_product;
|
|||
|
||||
pub use fs::{finalize_session_directory, in_incr_comp_dir, in_incr_comp_dir_sess};
|
||||
pub use load::{LoadResult, load_query_result_cache, setup_dep_graph};
|
||||
pub use save::{save_dep_graph, save_work_product_index};
|
||||
pub(crate) use save::save_dep_graph;
|
||||
pub use save::save_work_product_index;
|
||||
pub use work_product::copy_cgu_workproduct_to_incr_comp_cache_dir;
|
||||
|
|
|
@ -25,7 +25,7 @@ use crate::errors;
|
|||
///
|
||||
/// This function should only run after all queries have completed.
|
||||
/// Trying to execute a query afterwards would attempt to read the result cache we just dropped.
|
||||
pub fn save_dep_graph(tcx: TyCtxt<'_>) {
|
||||
pub(crate) fn save_dep_graph(tcx: TyCtxt<'_>) {
|
||||
debug!("save_dep_graph()");
|
||||
tcx.dep_graph.with_ignore(|| {
|
||||
let sess = tcx.sess;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue