about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2025-03-31 12:51:16 +1100
committerZalathar <Zalathar@users.noreply.github.com>2025-04-07 17:11:49 +1000
commit4322b6e97d6ad438c6c9ef1ea92e8ba00c056d9c (patch)
tree245a2263e6386c381d46ec47275282f3d2d1873e /compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs
parentb9856b6e400709392dd14599265b6fd52fc19f3e (diff)
downloadrust-4322b6e97d6ad438c6c9ef1ea92e8ba00c056d9c.tar.gz
rust-4322b6e97d6ad438c6c9ef1ea92e8ba00c056d9c.zip
coverage: Build the CGU's global file table as late as possible
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs
index ab030f5b615..68f60f169b5 100644
--- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs
+++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen/unused.rs
@@ -7,7 +7,6 @@ use rustc_middle::ty::{self, TyCtxt};
 use rustc_span::def_id::DefIdSet;
 
 use crate::common::CodegenCx;
-use crate::coverageinfo::mapgen::GlobalFileTable;
 use crate::coverageinfo::mapgen::covfun::{CovfunRecord, prepare_covfun_record};
 use crate::llvm;
 
@@ -21,7 +20,6 @@ use crate::llvm;
 /// its embedded coverage data.
 pub(crate) fn prepare_covfun_records_for_unused_functions<'tcx>(
     cx: &CodegenCx<'_, 'tcx>,
-    global_file_table: &mut GlobalFileTable,
     covfun_records: &mut Vec<CovfunRecord<'tcx>>,
 ) {
     assert!(cx.codegen_unit.is_code_coverage_dead_code_cgu());
@@ -33,7 +31,7 @@ pub(crate) fn prepare_covfun_records_for_unused_functions<'tcx>(
     // Try to create a covfun record for each unused function.
     let mut name_globals = Vec::with_capacity(unused_instances.len());
     covfun_records.extend(unused_instances.into_iter().filter_map(|unused| try {
-        let record = prepare_covfun_record(cx.tcx, global_file_table, unused.instance, false)?;
+        let record = prepare_covfun_record(cx.tcx, unused.instance, false)?;
         // If successful, also store its symbol name in a global constant.
         name_globals.push(cx.const_str(unused.symbol_name.name).0);
         record