File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
SwiftCompilerSources/Sources/Optimizer/Utilities Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -385,11 +385,15 @@ extension NonEscapingClosureDefUseWalker: ForwardingDefUseWalker {
385
385
386
386
mutating func nonForwardingUse( of operand: Operand ) -> WalkResult {
387
387
// Nonescaping closures may be moved, copied, or borrowed.
388
- if let transition = operand. instruction as? OwnershipTransitionInstruction {
388
+ switch operand. instruction {
389
+ case let transition as OwnershipTransitionInstruction :
389
390
return walkDownUses ( of: transition. ownershipResult, using: operand)
391
+ case let convert as ConvertEscapeToNoEscapeInst :
392
+ return walkDownUses ( of: convert, using: operand)
393
+ default :
394
+ // Otherwise, assume the use cannot propagate the closure context.
395
+ return closureContextLeafUse ( of: operand)
390
396
}
391
- // Otherwise, assume the use cannot propagate the closure context.
392
- return closureContextLeafUse ( of: operand)
393
397
}
394
398
395
399
mutating func deadValue( _ value: Value , using operand: Operand ? ) -> WalkResult {
You can’t perform that action at this time.
0 commit comments