diff options
| author | bors <bors@rust-lang.org> | 2023-09-14 01:05:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-14 01:05:18 +0000 |
| commit | c728bf3963433062b91bd84ffcb37d15416b800e (patch) | |
| tree | f016a2109e7038fa294ed5dcc97d8d905184ce2e /compiler/rustc_codegen_llvm/src | |
| parent | 8142a319ed5c1d1f96e5a1881a6546e463b77c8f (diff) | |
| parent | 0ca6c38cc22fe516ac5f25f87cff996cfd8932b7 (diff) | |
| download | rust-c728bf3963433062b91bd84ffcb37d15416b800e.tar.gz rust-c728bf3963433062b91bd84ffcb37d15416b800e.zip | |
Auto merge of #114656 - bossmc:rework-no-coverage-attr, r=oli-obk
Rework `no_coverage` to `coverage(off)` As discussed at the tail of https://github.com/rust-lang/rust/issues/84605 this replaces the `no_coverage` attribute with a `coverage` attribute that takes sub-parameters (currently `off` and `on`) to control the coverage instrumentation. Allows future-proofing for things like `coverage(off, reason="Tested live", issue="#12345")` or similar.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs index bda287d782c..8ba7a11abe5 100644 --- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs +++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs @@ -330,10 +330,10 @@ fn add_unused_functions(cx: &CodegenCx<'_, '_>) { { let codegen_fn_attrs = tcx.codegen_fn_attrs(non_codegenned_def_id); - // If a function is marked `#[no_coverage]`, then skip generating a + // If a function is marked `#[coverage(off)]`, then skip generating a // dead code stub for it. if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::NO_COVERAGE) { - debug!("skipping unused fn marked #[no_coverage]: {:?}", non_codegenned_def_id); + debug!("skipping unused fn marked #[coverage(off)]: {:?}", non_codegenned_def_id); continue; } |
