coverage: Store all of a function's mappings in function coverage info
Previously, mappings were attached to individual coverage statements in MIR. That necessitated special handling in MIR optimizations to avoid deleting those statements, since otherwise codegen would be unable to reassemble the original list of mappings. With this change, a function's list of mappings is now attached to its MIR body, and survives intact even if individual statements are deleted by optimizations.
This commit is contained in:
parent
4099ab1997
commit
6da319f635
14 changed files with 107 additions and 270 deletions
|
@ -5,7 +5,7 @@
|
|||
|
||||
use super::{BasicBlock, Const, Local, UserTypeProjection};
|
||||
|
||||
use crate::mir::coverage::{CodeRegion, CoverageKind};
|
||||
use crate::mir::coverage::CoverageKind;
|
||||
use crate::traits::Reveal;
|
||||
use crate::ty::adjustment::PointerCoercion;
|
||||
use crate::ty::GenericArgsRef;
|
||||
|
@ -514,7 +514,6 @@ pub enum FakeReadCause {
|
|||
#[derive(TypeFoldable, TypeVisitable)]
|
||||
pub struct Coverage {
|
||||
pub kind: CoverageKind,
|
||||
pub code_regions: Vec<CodeRegion>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, TyEncodable, TyDecodable, Hash, HashStable)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue