diff options
| author | bors <bors@rust-lang.org> | 2024-12-10 10:25:38 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-12-10 10:25:38 +0000 |
| commit | 499605271718bceaa629f0b954502c0040e4456b (patch) | |
| tree | b51977c7b9a0fe8cf76191f4e2ef1c71917bd510 /compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs | |
| parent | b597d2a099a1b5b79acef05175a9ac847047f8a1 (diff) | |
| parent | 8434a6e2bbb3c4855f24e1a86de960dca26cadf9 (diff) | |
| download | rust-499605271718bceaa629f0b954502c0040e4456b.tar.gz rust-499605271718bceaa629f0b954502c0040e4456b.zip | |
Auto merge of #134108 - fmease:rollup-tbtwm6j, r=fmease
Rollup of 10 pull requests Successful merges: - #131558 (Lint on combining `#[no_mangle]` and `#[export_name]`) - #133184 (wasi/fs: Improve stopping condition for <ReadDir as Iterator>::next) - #133456 (Add licenses + Run `cargo update`) - #133472 (Run TLS destructors for wasm32-wasip1-threads) - #133853 (use vendor sources by default on dist tarballs) - #133946 (coverage: Prefer to visit nodes whose predecessors have been visited) - #134010 (fix ICE on type error in promoted) - #134029 (coverage: Use a query to find counters/expressions that must be zero) - #134071 (Configure renovatebot) - #134102 (Miscellaneous fixes for nix-dev-shell) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs index c2fcb33f98b..82b6677e203 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs @@ -13,7 +13,7 @@ use tracing::{debug, instrument}; use crate::builder::Builder; use crate::common::CodegenCx; -use crate::coverageinfo::map_data::FunctionCoverageCollector; +use crate::coverageinfo::map_data::FunctionCoverage; use crate::llvm; pub(crate) mod ffi; @@ -24,8 +24,7 @@ mod mapgen; /// Extra per-CGU context/state needed for coverage instrumentation. pub(crate) struct CguCoverageContext<'ll, 'tcx> { /// Coverage data for each instrumented function identified by DefId. - pub(crate) function_coverage_map: - RefCell<FxIndexMap<Instance<'tcx>, FunctionCoverageCollector<'tcx>>>, + pub(crate) function_coverage_map: RefCell<FxIndexMap<Instance<'tcx>, FunctionCoverage<'tcx>>>, pub(crate) pgo_func_name_var_map: RefCell<FxHashMap<Instance<'tcx>, &'ll llvm::Value>>, pub(crate) mcdc_condition_bitmap_map: RefCell<FxHashMap<Instance<'tcx>, Vec<&'ll llvm::Value>>>, @@ -42,9 +41,7 @@ impl<'ll, 'tcx> CguCoverageContext<'ll, 'tcx> { } } - fn take_function_coverage_map( - &self, - ) -> FxIndexMap<Instance<'tcx>, FunctionCoverageCollector<'tcx>> { + fn take_function_coverage_map(&self) -> FxIndexMap<Instance<'tcx>, FunctionCoverage<'tcx>> { self.function_coverage_map.replace(FxIndexMap::default()) } @@ -161,8 +158,7 @@ impl<'tcx> CoverageInfoBuilderMethods<'tcx> for Builder<'_, '_, 'tcx> { // This includes functions that were not partitioned into this CGU, // but were MIR-inlined into one of this CGU's functions. coverage_cx.function_coverage_map.borrow_mut().entry(instance).or_insert_with(|| { - FunctionCoverageCollector::new( - instance, + FunctionCoverage::new_used( function_coverage_info, bx.tcx.coverage_ids_info(instance.def), ) |
