diff options
| author | bors <bors@rust-lang.org> | 2024-09-20 11:55:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-09-20 11:55:32 +0000 |
| commit | 1a5a2240bc1b8cf0bcce7acb946c78d6493a4fd3 (patch) | |
| tree | b27ce4a782580d7f16434bbfd32d0abd0129e868 /compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs | |
| parent | 2b11f265b68c151909aa7f31bfe49da1d788b317 (diff) | |
| parent | 1f359405cb661dc6e30f194a941b6948e9c14a7a (diff) | |
| download | rust-1a5a2240bc1b8cf0bcce7acb946c78d6493a4fd3.tar.gz rust-1a5a2240bc1b8cf0bcce7acb946c78d6493a4fd3.zip | |
Auto merge of #130506 - nnethercote:rustc_codegen_llvm-cleanups, r=jieyouxu
`rustc_codegen_llvm` cleanups Some improvements I found while reading through this crate's code. r? `@michaelwoerister`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs index 2ca5fc3300b..c9d2a1c9b88 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mod.rs @@ -48,11 +48,10 @@ impl<'ll, 'tcx> CrateCoverageContext<'ll, 'tcx> { self.function_coverage_map.replace(FxIndexMap::default()) } - /// LLVM use a temp value to record evaluated mcdc test vector of each decision, which is called condition bitmap. - /// In order to handle nested decisions, several condition bitmaps can be - /// allocated for a function body. - /// These values are named `mcdc.addr.{i}` and are a 32-bit integers. - /// They respectively hold the condition bitmaps for decisions with a depth of `i`. + /// LLVM use a temp value to record evaluated mcdc test vector of each decision, which is + /// called condition bitmap. In order to handle nested decisions, several condition bitmaps can + /// be allocated for a function body. These values are named `mcdc.addr.{i}` and are a 32-bit + /// integers. They respectively hold the condition bitmaps for decisions with a depth of `i`. fn try_get_mcdc_condition_bitmap( &self, instance: &Instance<'tcx>, @@ -157,8 +156,8 @@ impl<'tcx> CoverageInfoBuilderMethods<'tcx> for Builder<'_, '_, 'tcx> { ), CoverageKind::CounterIncrement { id } => { func_coverage.mark_counter_id_seen(id); - // We need to explicitly drop the `RefMut` before calling into `instrprof_increment`, - // as that needs an exclusive borrow. + // We need to explicitly drop the `RefMut` before calling into + // `instrprof_increment`, as that needs an exclusive borrow. drop(coverage_map); // The number of counters passed to `llvm.instrprof.increment` might |
