From: Fariborz Jahanian Date: Thu, 19 Feb 2009 18:29:24 +0000 (+0000) Subject: Generate the conservative objc gc's API for now. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=167fdc137edbfe57be11317b69c35b8d6bc33cf0;p=clang 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 --- 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; }