mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Do not flood on copy_nonoverlapping.
This commit is contained in:
parent
add5124dce
commit
79c073746b
@ -123,16 +123,18 @@ pub trait ValueAnalysis<'tcx> {
|
|||||||
fn super_intrinsic(
|
fn super_intrinsic(
|
||||||
&self,
|
&self,
|
||||||
intrinsic: &NonDivergingIntrinsic<'tcx>,
|
intrinsic: &NonDivergingIntrinsic<'tcx>,
|
||||||
state: &mut State<Self::Value>,
|
_state: &mut State<Self::Value>,
|
||||||
) {
|
) {
|
||||||
match intrinsic {
|
match intrinsic {
|
||||||
NonDivergingIntrinsic::Assume(..) => {
|
NonDivergingIntrinsic::Assume(..) => {
|
||||||
// Could use this, but ignoring it is sound.
|
// Could use this, but ignoring it is sound.
|
||||||
}
|
}
|
||||||
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping { dst, .. }) => {
|
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping {
|
||||||
if let Some(place) = dst.place() {
|
dst: _,
|
||||||
state.flood(place.as_ref(), self.map());
|
src: _,
|
||||||
}
|
count: _,
|
||||||
|
}) => {
|
||||||
|
// This statement represents `*dst = *src`, `count` times.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user