diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-12-19 21:53:10 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-12-19 22:03:43 +1100 |
| commit | aced4dcf1047aab08b769b34fae9d4ba7de87f04 (patch) | |
| tree | 40131ad1857c729b5bf690ba554fdfee4e43eb31 /compiler/rustc_session/src/config.rs | |
| parent | 837a25dd41a1cc58cee093159a01f73719f330e8 (diff) | |
| download | rust-aced4dcf1047aab08b769b34fae9d4ba7de87f04.tar.gz rust-aced4dcf1047aab08b769b34fae9d4ba7de87f04.zip | |
coverage: Add a synthetic test for when all spans are discarded
Diffstat (limited to 'compiler/rustc_session/src/config.rs')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 4784a4d1953..047e920e688 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -147,18 +147,24 @@ pub enum InstrumentCoverage { Yes, } -/// Individual flag values controlled by `-Z coverage-options`. +/// Individual flag values controlled by `-Zcoverage-options`. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Default)] pub struct CoverageOptions { pub level: CoverageLevel, - /// `-Z coverage-options=no-mir-spans`: Don't extract block coverage spans + /// `-Zcoverage-options=no-mir-spans`: Don't extract block coverage spans /// from MIR statements/terminators, making it easier to inspect/debug /// branch and MC/DC coverage mappings. /// /// For internal debugging only. If other code changes would make it hard /// to keep supporting this flag, remove it. pub no_mir_spans: bool, + + /// `-Zcoverage-options=discard-all-spans-in-codegen`: During codgen, + /// discard all coverage spans as though they were invalid. Needed by + /// regression tests for #133606, because we don't have an easy way to + /// reproduce it from actual source code. + pub discard_all_spans_in_codegen: bool, } /// Controls whether branch coverage or MC/DC coverage is enabled. |
