summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-02-19 18:29:24 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-02-19 18:29:24 +0000
commit167fdc137edbfe57be11317b69c35b8d6bc33cf0 (patch)
treede23d918b2bd4532803abcbc786ee0c6a5fd3a58 /lib/CodeGen/CGExpr.cpp
parent79f7f8ab9a8c741e29ea9e648d05f774de49cd9b (diff)
downloadclang-167fdc137edbfe57be11317b69c35b8d6bc33cf0.tar.gz
clang-167fdc137edbfe57be11317b69c35b8d6bc33cf0.tar.bz2
clang-167fdc137edbfe57be11317b69c35b8d6bc33cf0.tar.xz
Generate the conservative objc gc's API for now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index 6e7d936c7e..8f02ae134d 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -416,10 +416,17 @@ void CodeGenFunction::EmitStoreThroughLValue(RValue Src, LValue Dst,
// load of a __strong object.
llvm::Value *LvalueDst = Dst.getAddress();
llvm::Value *src = Src.getScalarVal();
+#if 0
+ // FIXME. We cannot positively determine if we have an
+ // 'ivar' assignment, object assignment or an unknown
+ // assignment. For now, generate call to objc_assign_strongCast
+ // assignment which is a safe, but consevative assumption.
if (Dst.isObjCIvar())
CGM.getObjCRuntime().EmitObjCIvarAssign(*this, src, LvalueDst);
else
CGM.getObjCRuntime().EmitObjCGlobalAssign(*this, src, LvalueDst);
+#endif
+ CGM.getObjCRuntime().EmitObjCStrongCastAssign(*this, src, LvalueDst);
return;
}