coverage. Fix panic when generating mcdc code for inlined functions
This commit is contained in:
parent
c77788f011
commit
83fa6b726a
4 changed files with 85 additions and 0 deletions
|
@ -41,6 +41,12 @@ struct CallSite<'tcx> {
|
|||
|
||||
impl<'tcx> MirPass<'tcx> for Inline {
|
||||
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
|
||||
// FIXME(#127234): Coverage instrumentation currently doesn't handle inlined
|
||||
// MIR correctly when Modified Condition/Decision Coverage is enabled.
|
||||
if sess.instrument_coverage_mcdc() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if let Some(enabled) = sess.opts.unstable_opts.inline_mir {
|
||||
return enabled;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue