about summary refs log tree commit diff
path: root/src/librustc_incremental
diff options
context:
space:
mode:
authorIsaac Whitfield <iw@whitfin.io>2018-05-09 08:16:08 -0700
committerIsaac Whitfield <iw@whitfin.io>2018-05-11 08:09:53 -0700
commit0a4fbe326a4a05ff01d07d362cc554bd8414ce89 (patch)
treee666daaec5f7ad0a19a7cfaa7de19662da1354ab /src/librustc_incremental
parent5c83422a5bdf8eacd4bbc727fb880b99ed66b04f (diff)
Update naming in line with PR comments
Diffstat (limited to 'src/librustc_incremental')
-rw-r--r--src/librustc_incremental/lib.rs4
-rw-r--r--src/librustc_incremental/persist/mod.rs4
-rw-r--r--src/librustc_incremental/persist/save.rs14
-rw-r--r--src/librustc_incremental/persist/work_product.rs9
4 files changed, 16 insertions, 15 deletions
diff --git a/src/librustc_incremental/lib.rs b/src/librustc_incremental/lib.rs
index af33e878032..ababce69e31 100644
--- a/src/librustc_incremental/lib.rs
+++ b/src/librustc_incremental/lib.rs
@@ -36,9 +36,9 @@ pub use persist::dep_graph_tcx_init;
 pub use persist::load_dep_graph;
 pub use persist::load_query_result_cache;
 pub use persist::LoadResult;
-pub use persist::create_trans_partition;
+pub use persist::copy_cgu_workproducts_to_incr_comp_cache_dir;
 pub use persist::save_dep_graph;
-pub use persist::save_work_products;
+pub use persist::save_work_product_index;
 pub use persist::in_incr_comp_dir;
 pub use persist::prepare_session_directory;
 pub use persist::finalize_session_directory;
diff --git a/src/librustc_incremental/persist/mod.rs b/src/librustc_incremental/persist/mod.rs
index 3c23b7c6417..e1f00db56d5 100644
--- a/src/librustc_incremental/persist/mod.rs
+++ b/src/librustc_incremental/persist/mod.rs
@@ -29,6 +29,6 @@ pub use self::load::load_dep_graph;
 pub use self::load::load_query_result_cache;
 pub use self::load::LoadResult;
 pub use self::save::save_dep_graph;
-pub use self::save::save_work_products;
-pub use self::work_product::create_trans_partition;
+pub use self::save::save_work_product_index;
+pub use self::work_product::copy_cgu_workproducts_to_incr_comp_cache_dir;
 pub use self::work_product::delete_workproduct_files;
diff --git a/src/librustc_incremental/persist/save.rs b/src/librustc_incremental/persist/save.rs
index 497d24fae5b..be725b17933 100644
--- a/src/librustc_incremental/persist/save.rs
+++ b/src/librustc_incremental/persist/save.rs
@@ -55,17 +55,17 @@ pub fn save_dep_graph<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
     })
 }
 
-pub fn save_work_products(sess: &Session,
-                          dep_graph: &DepGraph,
-                          new_work_products: FxHashMap<WorkProductId, WorkProduct>) {
+pub fn save_work_product_index(sess: &Session,
+                               dep_graph: &DepGraph,
+                               new_work_products: FxHashMap<WorkProductId, WorkProduct>) {
     if sess.opts.incremental.is_none() {
         return;
     }
 
-    debug!("save_work_products()");
+    debug!("save_work_product_index()");
     dep_graph.assert_ignored();
     let path = work_products_path(sess);
-    save_in(sess, path, |e| encode_work_products(&new_work_products, e));
+    save_in(sess, path, |e| encode_work_product_index(&new_work_products, e));
 
     // We also need to clean out old work-products, as not all of them are
     // deleted during invalidation. Some object files don't change their
@@ -234,8 +234,8 @@ fn encode_dep_graph(tcx: TyCtxt,
     Ok(())
 }
 
-fn encode_work_products(work_products: &FxHashMap<WorkProductId, WorkProduct>,
-                        encoder: &mut Encoder) -> io::Result<()> {
+fn encode_work_product_index(work_products: &FxHashMap<WorkProductId, WorkProduct>,
+                             encoder: &mut Encoder) -> io::Result<()> {
     let serialized_products: Vec<_> = work_products
         .iter()
         .map(|(id, work_product)| {
diff --git a/src/librustc_incremental/persist/work_product.rs b/src/librustc_incremental/persist/work_product.rs
index 23e3664cdba..d163ad1f3f3 100644
--- a/src/librustc_incremental/persist/work_product.rs
+++ b/src/librustc_incremental/persist/work_product.rs
@@ -17,10 +17,11 @@ use rustc::util::fs::link_or_copy;
 use std::path::PathBuf;
 use std::fs as std_fs;
 
-pub fn create_trans_partition(sess: &Session,
-                              cgu_name: &str,
-                              files: &[(WorkProductFileKind, PathBuf)])
-                                -> Option<(WorkProductId, WorkProduct)> {
+pub fn copy_cgu_workproducts_to_incr_comp_cache_dir(
+    sess: &Session,
+    cgu_name: &str,
+    files: &[(WorkProductFileKind, PathBuf)]
+) -> Option<(WorkProductId, WorkProduct)> {
     debug!("create_trans_partition({:?},{:?})",
            cgu_name,
            files);