[cfe-commits] r135067 - in /cfe/trunk: lib/ARCMigrate/TransProperties.cpp test/ARCMT/assign-prop-with-arc-runtime.m test/ARCMT/assign-prop-with-arc-runtime.m.result

Argyrios Kyrtzidis akyrtzi at gmail.com
Wed Jul 13 12:47:57 PDT 2011


Author: akirtzidis
Date: Wed Jul 13 14:47:57 2011
New Revision: 135067

URL: http://llvm.org/viewvc/llvm-project?rev=135067&view=rev
Log:
[arcmt] Add weak/unsafe_unretained for "@property (readonly)" when we are @synthesizing it.

Modified:
    cfe/trunk/lib/ARCMigrate/TransProperties.cpp
    cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m
    cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m.result

Modified: cfe/trunk/lib/ARCMigrate/TransProperties.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/TransProperties.cpp?rev=135067&r1=135066&r2=135067&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/TransProperties.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/TransProperties.cpp Wed Jul 13 14:47:57 2011
@@ -307,7 +307,7 @@
 
   bool hasNoBackingIvars(PropsTy &props) const {
     for (PropsTy::iterator I = props.begin(), E = props.end(); I != E; ++I)
-      if (isUserDeclared(I->IvarD))
+      if (I->IvarD)
         return false;
 
     return true;

Modified: cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m?rev=135067&r1=135066&r2=135067&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m (original)
+++ cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m Wed Jul 13 14:47:57 2011
@@ -30,10 +30,11 @@
 @property () NSObject *not_safe2;
 @property Forw *not_safe3;
 
- at property (assign) Foo *no_back_ivar;
+ at property (assign) Foo *no_user_ivar1;
+ at property (readonly) Foo *no_user_ivar2;
 @end
 
 @implementation Foo
 @synthesize x,w,q1,q2,oo,bcw,not_safe1,not_safe2,not_safe3;
- at synthesize no_back_ivar;
+ at synthesize no_user_ivar1, no_user_ivar2;
 @end

Modified: cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m.result
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m.result?rev=135067&r1=135066&r2=135067&view=diff
==============================================================================
--- cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m.result (original)
+++ cfe/trunk/test/ARCMT/assign-prop-with-arc-runtime.m.result Wed Jul 13 14:47:57 2011
@@ -30,10 +30,11 @@
 @property (unsafe_unretained) NSObject *not_safe2;
 @property (unsafe_unretained) Forw *not_safe3;
 
- at property (weak) Foo *no_back_ivar;
+ at property (weak) Foo *no_user_ivar1;
+ at property (weak, readonly) Foo *no_user_ivar2;
 @end
 
 @implementation Foo
 @synthesize x,w,q1,q2,oo,bcw,not_safe1,not_safe2,not_safe3;
- at synthesize no_back_ivar;
+ at synthesize no_user_ivar1, no_user_ivar2;
 @end





More information about the cfe-commits mailing list