From b0e1e121b32a9a04b39f1b77b3068bce2f3be05a Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Mon, 7 Nov 2011 18:46:46 +0000 Subject: [arcmt] In GC, handle (assign) @properties. -Move __strong/__weak added to a property type to the property attribute, e.g. "@property (assign) __weak Foo *prop;" --> "@property (weak) Foo *prop;" -Remove (assign) in a property so that it becomes strong-by-default in ARC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143979 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/ARCMT/GC.m | 19 +++++++++++++++++++ test/ARCMT/GC.m.result | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) (limited to 'test/ARCMT') diff --git a/test/ARCMT/GC.m b/test/ARCMT/GC.m index b3ba2a4211..e49bca8fa3 100644 --- a/test/ARCMT/GC.m +++ b/test/ARCMT/GC.m @@ -48,3 +48,22 @@ __attribute__((objc_arc_weak_reference_unavailable)) __weak QQ *q; } @end + +@interface I3 +@property (assign) I3 *__weak pw1, *__weak pw2; +@property (assign) I3 *__strong ps; +@property (assign) I3 * pds; +@end + +@interface I4Impl { + I4Impl *pds2; +} +@property (assign) I4Impl *__weak pw1, *__weak pw2; +@property (assign) I4Impl *__strong ps; +@property (assign) I4Impl * pds; +@property (assign) I4Impl * pds2; +@end + +@implementation I4Impl +@synthesize pw1, pw2, ps, pds, pds2; +@end diff --git a/test/ARCMT/GC.m.result b/test/ARCMT/GC.m.result index 405219ff3a..67a70e3dd2 100644 --- a/test/ARCMT/GC.m.result +++ b/test/ARCMT/GC.m.result @@ -43,3 +43,22 @@ __attribute__((objc_arc_weak_reference_unavailable)) __unsafe_unretained QQ *q; } @end + +@interface I3 +@property (weak) I3 * pw1, * pw2; +@property (strong) I3 * ps; +@property (assign) I3 * pds; +@end + +@interface I4Impl { + I4Impl *pds2; +} +@property (weak) I4Impl * pw1, * pw2; +@property I4Impl * ps; +@property I4Impl * pds; +@property I4Impl * pds2; +@end + +@implementation I4Impl +@synthesize pw1, pw2, ps, pds, pds2; +@end -- cgit v1.2.1