Skip to content

Commit 94c9075

Browse files
committed
Rename Linker::prepare_outputs as output_filenames.
It matches the type, and a noun makes more sense than a verb. The `output_filenames` function still uses a profiling label named `prepare_outputs`, but I think that makes sense as a verb and can be left unchanged.
1 parent aed8e1f commit 94c9075

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/rustc_interface/src/queries.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ impl<'tcx> Queries<'tcx> {
240240
self.global_ctxt()?.enter(|tcx| {
241241
Ok(Linker {
242242
dep_graph: tcx.dep_graph.clone(),
243-
prepare_outputs: tcx.output_filenames(()).clone(),
243+
output_filenames: tcx.output_filenames(()).clone(),
244244
crate_hash: if tcx.needs_crate_hash() {
245245
Some(tcx.crate_hash(LOCAL_CRATE))
246246
} else {
@@ -254,7 +254,7 @@ impl<'tcx> Queries<'tcx> {
254254

255255
pub struct Linker {
256256
dep_graph: DepGraph,
257-
prepare_outputs: Arc<OutputFilenames>,
257+
output_filenames: Arc<OutputFilenames>,
258258
// Only present when incr. comp. is enabled.
259259
crate_hash: Option<Svh>,
260260
ongoing_codegen: Box<dyn Any>,
@@ -263,7 +263,7 @@ pub struct Linker {
263263
impl Linker {
264264
pub fn link(self, sess: &Session, codegen_backend: &dyn CodegenBackend) -> Result<()> {
265265
let (codegen_results, work_products) =
266-
codegen_backend.join_codegen(self.ongoing_codegen, sess, &self.prepare_outputs)?;
266+
codegen_backend.join_codegen(self.ongoing_codegen, sess, &self.output_filenames)?;
267267

268268
sess.compile_status()?;
269269

@@ -289,14 +289,14 @@ impl Linker {
289289
}
290290

291291
if sess.opts.unstable_opts.no_link {
292-
let rlink_file = self.prepare_outputs.with_extension(config::RLINK_EXT);
292+
let rlink_file = self.output_filenames.with_extension(config::RLINK_EXT);
293293
CodegenResults::serialize_rlink(sess, &rlink_file, &codegen_results)
294294
.map_err(|error| sess.emit_fatal(FailedWritingFile { path: &rlink_file, error }))?;
295295
return Ok(());
296296
}
297297

298298
let _timer = sess.prof.verbose_generic_activity("link_crate");
299-
codegen_backend.link(sess, codegen_results, &self.prepare_outputs)
299+
codegen_backend.link(sess, codegen_results, &self.output_filenames)
300300
}
301301
}
302302

0 commit comments

Comments
 (0)