Skip to content

Commit 3ea4941

Browse files
committed
cleanup: standardize on summary over index in names
I did this in the user-facing logic, but I noticed while fixing a minor defect that I had missed it in a few places in the internal details.
1 parent de8200c commit 3ea4941

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -708,15 +708,15 @@ pub(crate) unsafe fn codegen(
708708
// asm from LLVM and use `gcc` to create the object file.
709709

710710
let bc_out = cgcx.output_filenames.temp_path(OutputType::Bitcode, module_name);
711-
let bc_index_out =
711+
let bc_summary_out =
712712
cgcx.output_filenames.temp_path(OutputType::ThinLinkBitcode, module_name);
713713
let obj_out = cgcx.output_filenames.temp_path(OutputType::Object, module_name);
714714

715715
if config.bitcode_needed() {
716716
let _timer = cgcx
717717
.prof
718718
.generic_activity_with_arg("LLVM_module_codegen_make_bitcode", &*module.name);
719-
let thin = ThinBuffer::new(llmod, config.emit_thin_lto, config.emit_thin_lto_index);
719+
let thin = ThinBuffer::new(llmod, config.emit_thin_lto, config.emit_thin_lto_summary);
720720
let data = thin.data();
721721

722722
if let Some(bitcode_filename) = bc_out.file_name() {
@@ -727,20 +727,20 @@ pub(crate) unsafe fn codegen(
727727
);
728728
}
729729

730-
if config.emit_thin_lto_index && let Some(thin_link_bitcode_filename) = bc_index_out.file_name() {
731-
let index_data = thin.thin_link_data();
730+
if config.emit_thin_lto_summary && let Some(thin_link_bitcode_filename) = bc_summary_out.file_name() {
731+
let summary_data = thin.thin_link_data();
732732
cgcx.prof.artifact_size(
733733
"llvm_bitcode_summary",
734734
thin_link_bitcode_filename.to_string_lossy(),
735-
index_data.len() as u64,
735+
summary_data.len() as u64,
736736
);
737737

738738
let _timer = cgcx.prof.generic_activity_with_arg(
739-
"LLVM_module_codegen_emit_bitcode_index",
739+
"LLVM_module_codegen_emit_bitcode_summary",
740740
&*module.name,
741741
);
742-
if let Err(err) = fs::write(&bc_index_out, index_data) {
743-
dcx.emit_err(WriteBytecode { path: &bc_index_out, err });
742+
if let Err(err) = fs::write(&bc_summary_out, summary_data) {
743+
dcx.emit_err(WriteBytecode { path: &bc_summary_out, err });
744744
}
745745
}
746746

compiler/rustc_codegen_ssa/src/back/write.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub struct ModuleConfig {
107107
pub emit_asm: bool,
108108
pub emit_obj: EmitObj,
109109
pub emit_thin_lto: bool,
110-
pub emit_thin_lto_index: bool,
110+
pub emit_thin_lto_summary: bool,
111111
pub bc_cmdline: String,
112112

113113
// Miscellaneous flags. These are mostly copied from command-line
@@ -232,7 +232,7 @@ impl ModuleConfig {
232232
),
233233
emit_obj,
234234
emit_thin_lto: sess.opts.unstable_opts.emit_thin_lto,
235-
emit_thin_lto_index: if_regular!(
235+
emit_thin_lto_summary: if_regular!(
236236
sess.opts.output_types.contains_key(&OutputType::ThinLinkBitcode),
237237
false
238238
),
@@ -287,7 +287,7 @@ impl ModuleConfig {
287287

288288
pub fn bitcode_needed(&self) -> bool {
289289
self.emit_bc
290-
|| self.emit_thin_lto_index
290+
|| self.emit_thin_lto_summary
291291
|| self.emit_obj == EmitObj::Bitcode
292292
|| self.emit_obj == EmitObj::ObjectCode(BitcodeSection::Full)
293293
}

0 commit comments

Comments
 (0)