coverage: Build the global file table on the fly

This commit is contained in:
Zalathar
2024-12-13 22:40:45 +11:00
parent fe412af4fc
commit 154fae1e8d
3 changed files with 33 additions and 37 deletions

View File

@@ -45,7 +45,7 @@ impl<'tcx> CovfunRecord<'tcx> {
pub(crate) fn prepare_covfun_record<'tcx>(
tcx: TyCtxt<'tcx>,
global_file_table: &GlobalFileTable,
global_file_table: &mut GlobalFileTable,
instance: Instance<'tcx>,
function_coverage: &FunctionCoverage<'tcx>,
) -> Option<CovfunRecord<'tcx>> {
@@ -75,7 +75,7 @@ pub(crate) fn prepare_covfun_record<'tcx>(
/// Populates the mapping region tables in the current function's covfun record.
fn fill_region_tables<'tcx>(
tcx: TyCtxt<'tcx>,
global_file_table: &GlobalFileTable,
global_file_table: &mut GlobalFileTable,
function_coverage: &FunctionCoverage<'tcx>,
covfun: &mut CovfunRecord<'tcx>,
) {