Skip to content
Commit 0231a4e5 authored by Akira Hatanaka's avatar Akira Hatanaka
Browse files

[ObjC][ARC] In HandlePotentialAlterRefCount, check whether an

instruction can decrement the reference count, not whether it can alter
it

This prevents the state transition from S_Use to S_CanRelease when doing
a bottom-up traversal and the transition from S_Retain to S_CanRelease
when doing a top-down traversal when the visited instruction can
increment the ref count but cannot decrement it. This allows the ARC
optimizer to remove retain/release pairs which were previously not
removed.

rdar://problem/21793154
parent 9f2fbfab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment