blob: 074ee13f3a5bdf6220ed70fc4830c065a85ef899 [file] [log] [blame]
John McCalld1e40d52011-10-02 01:16:38 +00001// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -triple x86_64-apple-darwin -O0 -S %s -o %t-64.s
Tim Northover931a4fe2013-08-12 12:51:05 +00002// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
Benjamin Kramerea104cd2012-09-18 13:34:01 +00003// REQUIRES: x86-64-registered-target
John McCallf85e1932011-06-15 23:02:42 +00004// rdar://8991729
5
6@interface NSObject {
7 id isa;
8}
9@end
10
11@interface AllPointers : NSObject {
12 id foo;
13 id __strong bar;
14 NSObject *bletch;
15}
16@end
17
18@implementation AllPointers
19@end
20// CHECK-LP64: L_OBJC_CLASS_NAME_1:
21// CHECK-LP64-NEXT: .asciz "\003"
22
23@class NSString, NSNumber;
24@interface A : NSObject {
25 NSString *foo;
26 NSNumber *bar;
27 unsigned int bletch;
28 __weak id delegate;
29}
30@end
31
32@interface B : A {
33 unsigned int x;
34 NSString *y;
35 NSString *z;
36}
37@end
38
39@implementation A @end
40
41@implementation B @end
42
43// CHECK-LP64: L_OBJC_CLASS_NAME_15:
44// CHECK-LP64-NEXT: .asciz "\022"
45
Fariborz Jahanianba83c952012-02-16 00:15:02 +000046@interface UnsafePerson {
47@public
48 __unsafe_unretained id name;
49 __unsafe_unretained id age;
50 id value;
51}
52@end
53
54@implementation UnsafePerson @end
55// CHECK-LP64: L_OBJC_CLASS_NAME_20:
56// CHECK-LP64-NEXT: .asciz "!"