diff options
Diffstat (limited to 'test/CodeGenObjCXX/property-object-reference.mm')
-rw-r--r-- | test/CodeGenObjCXX/property-object-reference.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenObjCXX/property-object-reference.mm b/test/CodeGenObjCXX/property-object-reference.mm index b87ce23..0bd8fb8 100644 --- a/test/CodeGenObjCXX/property-object-reference.mm +++ b/test/CodeGenObjCXX/property-object-reference.mm @@ -2,9 +2,14 @@ // rdar://10188258 struct Foo {int i;}; +static Foo gFoo; + @interface ObjCTest { } @property (nonatomic, readonly) Foo& FooRefProperty; +@property (nonatomic) Foo FooProperty; +- (Foo &) FooProperty; +- (void)setFooProperty : (Foo &) arg; @end @@ -13,11 +18,18 @@ struct Foo {int i;}; -(void) test { Foo& f = self.FooRefProperty; + Foo& f1 = self.FooProperty; } +- (Foo &) FooProperty { return gFoo; } +- (void)setFooProperty : (Foo &) arg { }; @end // CHECK: [[T0:%.*]] = load {{%.*}} [[S0:%.*]] // CHECK: load i8** @"\01L_OBJC_SELECTOR_REFERENCES_ // CHECK: [[T2:%.*]] = bitcast {{%.*}} [[T0]] to i8* // CHECK: @objc_msgSend +// CHECK: [[R0:%.*]] = load {{%.*}} [[U0:%.*]] +// CHECK: load i8** @"\01L_OBJC_SELECTOR_REFERENCES_ +// CHECK: [[R2:%.*]] = bitcast {{%.*}} [[R0]] to i8* +// CHECK: @objc_msgSend |