[cfe-commits] r65051 - /cfe/trunk/lib/CodeGen/CGExpr.cpp

Fariborz Jahanian fjahanian at apple.com
Thu Feb 19 10:29:24 PST 2009


Author: fjahanian
Date: Thu Feb 19 12:29:24 2009
New Revision: 65051

URL: http://llvm.org/viewvc/llvm-project?rev=65051&view=rev
Log:
Generate the conservative objc gc's API for now.


Modified:
    cfe/trunk/lib/CodeGen/CGExpr.cpp

Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=65051&r1=65050&r2=65051&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Thu Feb 19 12:29:24 2009
@@ -416,10 +416,17 @@
     // 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;
   }
   





More information about the cfe-commits mailing list