[objc-arc] Convert the one directional retain/release relation assert to a conditiona...
authorMichael Gottesman <mgottesman@apple.com>
Tue, 5 Nov 2013 16:02:40 +0000 (16:02 +0000)
committerMichael Gottesman <mgottesman@apple.com>
Tue, 5 Nov 2013 16:02:40 +0000 (16:02 +0000)
commitf23af8bfd8609b9594947876209c3f0de070ea4f
tree2a1398d26f20184c7a1ff038c68625e9bc4698d9
parent04ae34b0aa918b97cc94c6ac3cf30bc19cd5471e
[objc-arc] Convert the one directional retain/release relation assert to a conditional check + fail.

Due to the previously added overflow checks, we can have a retain/release
relation that is one directional. This occurs specifically when we run into an
additive overflow causing us to drop state in only one direction. If that
occurs, we should bail and not optimize that retain/release instead of
asserting.

Apologies for the size of the testcase. It is necessary to cause the additive
cfg overflow to trigger.

rdar://15377890

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194083 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/ObjCARC/ObjCARCOpts.cpp
test/Transforms/ObjCARC/path-overflow.ll