Consider StorageDead and StorageLive as gens for liveness analysis
This commit is contained in:
parent
75eb59895f
commit
21f2d259e0
1 changed files with 4 additions and 2 deletions
|
|
@ -46,7 +46,10 @@ impl<'tcx> Visitor<'tcx> for BlockInfoVisitor {
|
|||
location: Location) {
|
||||
if let Lvalue::Local(local) = *lvalue {
|
||||
match context {
|
||||
LvalueContext::Store | LvalueContext::Call => {
|
||||
LvalueContext::Store |
|
||||
LvalueContext::Call |
|
||||
LvalueContext::StorageLive |
|
||||
LvalueContext::StorageDead => {
|
||||
self.defs.add(&local);
|
||||
}
|
||||
LvalueContext::Projection(..) |
|
||||
|
|
@ -59,7 +62,6 @@ impl<'tcx> Visitor<'tcx> for BlockInfoVisitor {
|
|||
self.uses.add(&local);
|
||||
}
|
||||
}
|
||||
LvalueContext::StorageLive | LvalueContext::StorageDead => (),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue