swift
188ecdc2 - Fix ARCSequenceOpts handle of is_escaping_closure

Commit
6 years ago
Fix ARCSequenceOpts handle of is_escaping_closure Handle is_escaping_closure like an RC-checking instructions. It looks like it "may-decrement" RC because: if the object must be live after the instruction and the subsequent local release, then it expects the refcount to be greater than one. In other words, do not remove a retain/release pair that spans an is_escaping_closure instruction. This would otherwise fail to catch closures that are returned from the function. The following retain/release pair cannot be removed: %me = partial_apply retain %me is_escaping_closure %me release %me return %me Fixes <rdar://problem/52803634>
Author
Committer
Parents
Loading