@@ -706,12 +706,8 @@ extension LifetimeDependenceUseDefWalker {
706
706
mutating func walkUpDefault( dependent value: Value , owner: Value ? )
707
707
-> WalkResult {
708
708
switch value. definingInstruction {
709
- case let copyInst as CopyValueInst :
710
- return walkUp ( newLifetime: copyInst. fromValue)
711
- case let moveInst as MoveValueInst :
712
- return walkUp ( value: moveInst. fromValue, owner)
713
- case let borrow as BeginBorrowInst :
714
- return walkUp ( newLifetime: borrow. borrowedValue)
709
+ case let transition as OwnershipTransitionInstruction :
710
+ return walkUp ( newLifetime: transition. operand. value)
715
711
case let load as LoadInstruction :
716
712
return walkUp ( address: load. address)
717
713
case let markDep as MarkDependenceInst :
@@ -862,11 +858,8 @@ extension LifetimeDependenceDefUseWalker {
862
858
return leafUse ( of: operand)
863
859
}
864
860
switch operand. instruction {
865
- case let copy as CopyingInstruction :
866
- return walkDownUses ( of: copy, using: operand)
867
-
868
- case let move as MoveValueInst :
869
- return walkDownUses ( of: move, using: operand)
861
+ case let transition as OwnershipTransitionInstruction :
862
+ return walkDownUses ( of: transition. ownershipResult, using: operand)
870
863
871
864
case let mdi as MarkDependenceInst where mdi. isUnresolved:
872
865
// Override mark_dependence [unresolved] to handle them just
0 commit comments