about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-11-24 18:26:05 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-11-30 00:58:48 +1100
commit6fc0fe76e8495e638a8b69461b8001437b4f319a (patch)
treec770070a32aa8901185a46728f61e387a9bc19e1 /compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
parent121a17ccc34f3812142c6e1683b4e5a1ce256c1a (diff)
downloadrust-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.rs6
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);
 }