coverage: Remove all unstable support for MC/DC instrumentation
This commit is contained in:
@@ -190,7 +190,7 @@ pub struct CoverageOptions {
|
||||
pub discard_all_spans_in_codegen: bool,
|
||||
}
|
||||
|
||||
/// Controls whether branch coverage or MC/DC coverage is enabled.
|
||||
/// Controls whether branch coverage is enabled.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug, Default)]
|
||||
pub enum CoverageLevel {
|
||||
/// Instrument for coverage at the MIR block level.
|
||||
@@ -214,9 +214,6 @@ pub enum CoverageLevel {
|
||||
/// instrumentation, so it might be removed in the future when MC/DC is
|
||||
/// sufficiently complete, or if it is making MC/DC changes difficult.
|
||||
Condition,
|
||||
/// Instrument for MC/DC. Mostly a superset of condition coverage, but might
|
||||
/// differ in some corner cases.
|
||||
Mcdc,
|
||||
}
|
||||
|
||||
// The different settings that the `-Z offload` flag can have.
|
||||
|
||||
@@ -755,7 +755,7 @@ mod desc {
|
||||
pub(crate) const parse_linker_flavor: &str = ::rustc_target::spec::LinkerFlavorCli::one_of();
|
||||
pub(crate) const parse_dump_mono_stats: &str = "`markdown` (default) or `json`";
|
||||
pub(crate) const parse_instrument_coverage: &str = parse_bool;
|
||||
pub(crate) const parse_coverage_options: &str = "`block` | `branch` | `condition` | `mcdc`";
|
||||
pub(crate) const parse_coverage_options: &str = "`block` | `branch` | `condition`";
|
||||
pub(crate) const parse_instrument_xray: &str = "either a boolean (`yes`, `no`, `on`, `off`, etc), or a comma separated list of settings: `always` or `never` (mutually exclusive), `ignore-loops`, `instruction-threshold=N`, `skip-entry`, `skip-exit`";
|
||||
pub(crate) const parse_unpretty: &str = "`string` or `string=string`";
|
||||
pub(crate) const parse_treat_err_as_bug: &str = "either no value or a non-negative number";
|
||||
@@ -1458,7 +1458,6 @@ pub mod parse {
|
||||
"block" => slot.level = CoverageLevel::Block,
|
||||
"branch" => slot.level = CoverageLevel::Branch,
|
||||
"condition" => slot.level = CoverageLevel::Condition,
|
||||
"mcdc" => slot.level = CoverageLevel::Mcdc,
|
||||
"discard-all-spans-in-codegen" => slot.discard_all_spans_in_codegen = true,
|
||||
_ => return false,
|
||||
}
|
||||
|
||||
@@ -354,11 +354,6 @@ impl Session {
|
||||
&& self.opts.unstable_opts.coverage_options.level >= CoverageLevel::Condition
|
||||
}
|
||||
|
||||
pub fn instrument_coverage_mcdc(&self) -> bool {
|
||||
self.instrument_coverage()
|
||||
&& self.opts.unstable_opts.coverage_options.level >= CoverageLevel::Mcdc
|
||||
}
|
||||
|
||||
/// Provides direct access to the `CoverageOptions` struct, so that
|
||||
/// individual flags for debugging/testing coverage instrumetation don't
|
||||
/// need separate accessors.
|
||||
|
||||
Reference in New Issue
Block a user