mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
code for closures iff the closure is not created by the caller function where the code is generated. Otherwise, when the closure is created by the caller, just reuse it after copying and extending its lifetime. Before this change new closures were created as long as all captures of the closures were symbolic constants. This patch updates it so that even if all captures are symbolic constants no code is generated for closures that are already available in the caller. This avoids doing needless work and also fixes the following bug. <rdar://problem/61465764>
35 KiB
35 KiB