mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When a specialization is created, in the original function, releases are added in two different places: (1) `ClosureSpecCloner::populateCloned` (2) `rewriteApplyInst` In the former, releases are added for closures which are guaranteed or trivial noescape (but with owned convention). In the latter, releases are added for closures that are owned. Previously, when emitting releases at (2), whether the closure was trivial noescape wasn't considered. The result was inserting the releases twice, an overrelease. Here, fix (2) to recognize trivial noescape as not +1. rdar://110115795
59 KiB
59 KiB