]> granicus.if.org Git - clang/commitdiff
Generate the conservative objc gc's API for now.
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 19 Feb 2009 18:29:24 +0000 (18:29 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 19 Feb 2009 18:29:24 +0000 (18:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65051 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExpr.cpp

index 6e7d936c7e2cc72e93cee04e8187be5839b0640c..8f02ae134d1f15ff0f63e1bb96bf0a99089c5633 100644 (file)
@@ -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;
   }