[cfe-commits] r139211 - /cfe/trunk/lib/Sema/SemaObjCProperty.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Sep 6 17:38:49 PDT 2011


Author: fjahanian
Date: Tue Sep  6 19:38:49 2011
New Revision: 139211

URL: http://llvm.org/viewvc/llvm-project?rev=139211&view=rev
Log:
objc-gc: Don't force a __strong type'd property
to be 'weak'. This prevents a crash and should 
probably be flagged as error - later to come.

Modified:
    cfe/trunk/lib/Sema/SemaObjCProperty.cpp

Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=139211&r1=139210&r2=139211&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Tue Sep  6 19:38:49 2011
@@ -598,7 +598,7 @@
                              !getLangOptions().ObjCAutoRefCount &&
                              getLangOptions().getGCMode() != 
                              LangOptions::NonGC);
-    if (PropertyIsGCWeak)
+    if (PropertyIsGCWeak && !PropType.isObjCGCStrong())
       PropType = Context.getObjCGCQualType(PropType, Qualifiers::Weak);
     QualType PropertyIvarType = PropType;
     if (PropType->isReferenceType())





More information about the cfe-commits mailing list