-
- Downloads
Emit calls to objc_unsafeClaimAutoreleasedReturnValue when
reclaiming a call result in order to ignore it or assign it to an __unsafe_unretained variable. This avoids adding an unwanted retain/release pair when the return value is not actually returned autoreleased (e.g. when it is returned from a nonatomic getter or a typical collection accessor). This runtime function is only available on the latest Apple OS releases; the backwards-compatibility story is that you don't get the optimization unless your deployment target is recent enough. Sorry. rdar://20530049 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258962 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/ObjCRuntime.h 17 additions, 0 deletionsinclude/clang/Basic/ObjCRuntime.h
- lib/CodeGen/CGDecl.cpp 1 addition, 2 deletionslib/CodeGen/CGDecl.cpp
- lib/CodeGen/CGExprScalar.cpp 9 additions, 9 deletionslib/CodeGen/CGExprScalar.cpp
- lib/CodeGen/CGObjC.cpp 435 additions, 160 deletionslib/CodeGen/CGObjC.cpp
- lib/CodeGen/CodeGenFunction.h 6 additions, 0 deletionslib/CodeGen/CodeGenFunction.h
- lib/CodeGen/CodeGenModule.h 3 additions, 0 deletionslib/CodeGen/CodeGenModule.h
- test/CodeGenObjC/arc-unsafeclaim.m 231 additions, 0 deletionstest/CodeGenObjC/arc-unsafeclaim.m
Loading
Please register or sign in to comment