mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-06 12:18:33 +00:00
Stop marking locals as dead in ConstProp.
This commit is contained in:
parent
70e04bd88d
commit
cc4d1e581e
@ -886,13 +886,7 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatementKind::StorageLive(local) => {
|
StatementKind::StorageLive(local) => {
|
||||||
let frame = self.ecx.frame_mut();
|
Self::remove_const(&mut self.ecx, local);
|
||||||
frame.locals[local].value =
|
|
||||||
LocalValue::Live(interpret::Operand::Immediate(interpret::Immediate::Uninit));
|
|
||||||
}
|
|
||||||
StatementKind::StorageDead(local) => {
|
|
||||||
let frame = self.ecx.frame_mut();
|
|
||||||
frame.locals[local].value = LocalValue::Dead;
|
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user