Add support for objc_unsafeClaimAutoreleasedReturnValue to the
authorJohn McCall <rjmccall@apple.com>
Wed, 27 Jan 2016 19:05:08 +0000 (19:05 +0000)
committerJohn McCall <rjmccall@apple.com>
Wed, 27 Jan 2016 19:05:08 +0000 (19:05 +0000)
commit3fe604f89fccfe1534eeaf4b4e328185d01659f6
treea5113ad2639cc50d9a0a3f68f993f3d26d634ccf
parent671e6340da589fe94d30fa97fb3c89318881a775
Add support for objc_unsafeClaimAutoreleasedReturnValue to the
ObjC ARC Optimizer.

The main implication of this is:

1. Ensuring that we treat it conservatively in terms of optimization.
2. We put the ASM marker on it so that the runtime can recognize
objc_unsafeClaimAutoreleasedReturnValue from releaseRV.

<rdar://problem/21567064>

Patch by Michael Gottesman!

llvm-svn: 258970
llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
llvm/include/llvm/Analysis/ObjCARCInstKind.h
llvm/lib/Analysis/ObjCARCInstKind.cpp
llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
llvm/test/Transforms/ObjCARC/basic.ll
llvm/test/Transforms/ObjCARC/contract-marker.ll
llvm/test/Transforms/ObjCARC/tail-call-invariant-enforcement.ll