Introduce -C instrument-coverage=branch to gate branch coverage

This flag has to be used in combination with `-Zunstable-options`,
and is added in advance of adding branch coverage instrumentation.
This commit is contained in:
Arpad Borsos
2023-08-21 10:54:37 +02:00
committed by Arpad Borsos
parent 1322f92634
commit 2b36547e9c
7 changed files with 19 additions and 6 deletions

View File

@@ -702,6 +702,10 @@ impl Session {
self.opts.cg.instrument_coverage() != InstrumentCoverage::Off
}
pub fn instrument_coverage_branch(&self) -> bool {
self.opts.cg.instrument_coverage() == InstrumentCoverage::Branch
}
pub fn instrument_coverage_except_unused_generics(&self) -> bool {
self.opts.cg.instrument_coverage() == InstrumentCoverage::ExceptUnusedGenerics
}