swift
6b55e87d - SILGen: Emit mark_function_escape when capturing variable boxes.

Commit
10 years ago
SILGen: Emit mark_function_escape when capturing variable boxes. There's no longer a direct use of the variable's address when we invoke the closure, but we have a handy mark_function_escape instruction to mark the use without requiring merging analysis of the box and its contents. This also gives us a slightly more accurate error message when a variable is prematurely captured, noting the variable was captured by a closure instead of just generically used.
Author
Committer
Parents
Loading