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 {
385385
386386 mutating func nonForwardingUse( of operand: Operand ) -> WalkResult {
387387 // 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 :
389390 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)
390396 }
391- // Otherwise, assume the use cannot propagate the closure context.
392- return closureContextLeafUse ( of: operand)
393397 }
394398
395399 mutating func deadValue( _ value: Value , using operand: Operand ? ) -> WalkResult {
You can’t perform that action at this time.
0 commit comments