You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[silgen] Balance out the +1 from the self argument in deallocating deinits using end_lifetime.
The issue here is that:
1. Self is passed into deallocating deinits at +1.
2. Destroying deinits take in self as a +0 value that is then returned at +1.
This means that the lifetime of self can not be modeled statically in a
deallocating deinit without analyzing the body of the destroying deinit
(something that violates semantic sil). Thus we add an artifical destroy of
self before the actual destroy of self so that the verifier can understand
that self is being properly balanced.
rdar://29791263
0 commit comments