diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-24 18:26:05 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-11-30 00:58:48 +1100 |
| commit | 6fc0fe76e8495e638a8b69461b8001437b4f319a (patch) | |
| tree | c770070a32aa8901185a46728f61e387a9bc19e1 /compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs | |
| parent | 121a17ccc34f3812142c6e1683b4e5a1ce256c1a (diff) | |
| download | rust-6fc0fe76e8495e638a8b69461b8001437b4f319a.tar.gz rust-6fc0fe76e8495e638a8b69461b8001437b4f319a.zip | |
coverage: Use a query to identify which counter/expression IDs are used
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs index 059eace8691..8c24579fa7c 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs @@ -536,7 +536,11 @@ fn add_unused_function_coverage<'tcx>( ); // An unused function's mappings will all be rewritten to map to zero. - let function_coverage = FunctionCoverageCollector::unused(instance, function_coverage_info); + let function_coverage = FunctionCoverageCollector::unused( + instance, + function_coverage_info, + tcx.coverage_ids_info(instance.def), + ); cx.coverage_cx().function_coverage_map.borrow_mut().insert(instance, function_coverage); } |
