llvm-project
6b7a8649 - [ObjCARC] Move autorelease-to-release conversion to pool pop site instead of converting in place (#152353)

Commit
3 days ago
[ObjCARC] Move autorelease-to-release conversion to pool pop site instead of converting in place (#152353) Instead of converting objc_autorelease(x) to objc_release(x) in place (which requires checking for uses of x between the autorelease and the pool pop), insert the release just before the matching autoreleasePoolPop. This is safe because objc_autorelease does not change the refcount; it only registers the object for a deferred release at pool drain time. Removing the autorelease and placing an explicit release at the drain point is semantically equivalent.
Author
Parents
Loading