summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 6e7d936c7e2..8f02ae134d1 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud