@@ -219,7 +219,7 @@ extension LifetimeDependence {
219219 //
220220 // TODO: handle indirect results
221221 init ? ( unsafeApplyResult value: Value , _ context: some Context ) {
222- if value. type . isEscapable {
222+ if value. isEscapable {
223223 return nil
224224 }
225225 if ( value. definingInstruction as! FullApplySite ) . hasResultDependence {
@@ -832,7 +832,7 @@ extension LifetimeDependenceDefUseWalker {
832832 mutating func walkDownUses( of value: Value , using operand: Operand ? )
833833 -> WalkResult {
834834 // Only track ~Escapable and @noescape types.
835- if value. type . mayEscape {
835+ if value. mayEscape {
836836 return . continueWalk
837837 }
838838 return walkDownUsesDefault ( forwarding: value, using: operand)
@@ -857,10 +857,10 @@ extension LifetimeDependenceDefUseWalker {
857857 if let apply = operand. instruction as? FullApplySite {
858858 return visitAppliedUse ( of: operand, by: apply)
859859 }
860- if operand. instruction is ReturnInst , !operand. value. type . isEscapable {
860+ if operand. instruction is ReturnInst , !operand. value. isEscapable {
861861 return returnedDependence ( result: operand)
862862 }
863- if operand. instruction is YieldInst , !operand. value. type . isEscapable {
863+ if operand. instruction is YieldInst , !operand. value. isEscapable {
864864 return yieldedDependence ( result: operand)
865865 }
866866 return escapingDependence ( on: operand)
@@ -1025,10 +1025,10 @@ extension LifetimeDependenceDefUseWalker {
10251025 assert ( !mdi. isUnresolved && !mdi. isNonEscaping,
10261026 " should be handled as a dependence by AddressUseVisitor " )
10271027 }
1028- if operand. instruction is ReturnInst , !operand. value. type . isEscapable {
1028+ if operand. instruction is ReturnInst , !operand. value. isEscapable {
10291029 return returnedDependence ( result: operand)
10301030 }
1031- if operand. instruction is YieldInst , !operand. value. type . isEscapable {
1031+ if operand. instruction is YieldInst , !operand. value. isEscapable {
10321032 return yieldedDependence ( result: operand)
10331033 }
10341034 return escapingDependence ( on: operand)
@@ -1088,19 +1088,19 @@ extension LifetimeDependenceDefUseWalker {
10881088 case let . argument( arg) :
10891089 if arg. convention. isIndirectIn || arg. convention. isInout {
10901090 allocation = arg
1091- } else if arg. convention. isIndirectOut, !arg. type . isEscapable {
1091+ } else if arg. convention. isIndirectOut, !arg. isEscapable {
10921092 return returnedDependence ( address: arg, using: operand)
10931093 }
10941094 break
10951095 case . global, . class, . tail, . yield, . pointer, . unidentified:
10961096 break
10971097 }
10981098 if let allocation = allocation {
1099- if !allocation. type . objectType . isEscapable {
1099+ if !allocation. isEscapable {
11001100 return visitLocalStore ( allocation: allocation, storedOperand: operand, storeAddress: address)
11011101 }
11021102 }
1103- if address. type . objectType . isEscapable {
1103+ if address. isEscapable {
11041104 return . continueWalk
11051105 }
11061106 return escapingDependence ( on: operand)
@@ -1179,13 +1179,13 @@ extension LifetimeDependenceDefUseWalker {
11791179 // If the lifetime dependence is scoped, then we can ignore it
11801180 // because a mark_dependence [nonescaping] represents the
11811181 // dependence.
1182- if let result = apply. singleDirectResult, !result. type . isEscapable {
1182+ if let result = apply. singleDirectResult, !result. isEscapable {
11831183 if dependentUse ( of: operand, into: result) == . abortWalk {
11841184 return . abortWalk
11851185 }
11861186 }
11871187 for resultAddr in apply. indirectResultOperands
1188- where !resultAddr. value. type . isEscapable {
1188+ where !resultAddr. value. isEscapable {
11891189 if visitStoredUses ( of: operand, into: resultAddr. value) == . abortWalk {
11901190 return . abortWalk
11911191 }
0 commit comments