diff options
author | John McCall <rjmccall@apple.com> | 2013-03-23 02:35:54 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-03-23 02:35:54 +0000 |
commit | eff188427497970286f5f4e4e496e42b2fc09b64 (patch) | |
tree | ba7209f1225676ddbdcdda6d33e77fa34c0ec8c1 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 9d71afe8cfd49c92504c382b08ed39f6390fc51b (diff) | |
download | bcm5719-llvm-eff188427497970286f5f4e4e496e42b2fc09b64.tar.gz bcm5719-llvm-eff188427497970286f5f4e4e496e42b2fc09b64.zip |
Under ARC, when we're passing the address of a strong variable
to an out-parameter using the indirect-writeback conversion,
and we copied the current value of the variable to the temporary,
make sure that we register an intrinsic use of that value with
the optimizer so that the value won't get released until we have
a chance to retain it.
rdar://13195034
llvm-svn: 177813
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 19a4d571ee2..46848ae2d7e 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2478,6 +2478,8 @@ public: llvm::Value *EmitARCRetainScalarExpr(const Expr *expr); llvm::Value *EmitARCRetainAutoreleaseScalarExpr(const Expr *expr); + void EmitARCIntrinsicUse(llvm::ArrayRef<llvm::Value*> values); + static Destroyer destroyARCStrongImprecise; static Destroyer destroyARCStrongPrecise; static Destroyer destroyARCWeak; |