Skip to content

Commit

Permalink
Rename CodegenUnit::work_product to previous_work_product
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed May 13, 2022
1 parent 21010f9 commit 81f7325
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/src/driver/aot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ fn reuse_workproduct_for_cgu(
work_products: &mut FxHashMap<WorkProductId, WorkProduct>,
) -> CompiledModule {
let mut object = None;
let work_product = cgu.work_product(tcx);
let work_product = cgu.previous_work_product(tcx);
if let Some(saved_file) = &work_product.saved_file {
let obj_out =
tcx.output_filenames(()).temp_path(OutputType::Object, Some(cgu.name().as_str()));
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_ssa/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
&ongoing_codegen.coordinator_send,
CachedModuleCodegen {
name: cgu.name().to_string(),
source: cgu.work_product(tcx),
source: cgu.previous_work_product(tcx),
},
);
true
Expand All @@ -711,7 +711,7 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
&ongoing_codegen.coordinator_send,
CachedModuleCodegen {
name: cgu.name().to_string(),
source: cgu.work_product(tcx),
source: cgu.previous_work_product(tcx),
},
);
true
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/mir/mono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ impl<'tcx> CodegenUnit<'tcx> {
WorkProductId::from_cgu_name(self.name().as_str())
}

pub fn work_product(&self, tcx: TyCtxt<'_>) -> WorkProduct {
pub fn previous_work_product(&self, tcx: TyCtxt<'_>) -> WorkProduct {
let work_product_id = self.work_product_id();
tcx.dep_graph
.previous_work_product(&work_product_id)
Expand Down

0 comments on commit 81f7325

Please sign in to comment.