blob: bbd29cbdc943840c17fe1510b64cec7cae734da5 [file] [log] [blame]
Fariborz Jahanian271b8d42012-06-29 22:54:56 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o %t %s
2// RUN: FileCheck < %t %s
3// rdar://11777609
4
5typedef struct {} Z;
6
7@interface A
8-(void)bar:(Z)a;
9-(void)foo:(Z)a : (char*)b : (Z)c : (double) d;
10@end
11
12@implementation A
13-(void)bar:(Z)a {}
14-(void)foo:(Z)a: (char*)b : (Z)c : (double) d {}
15@end
16
Saleem Abdulrasool3f307512016-09-18 16:12:14 +000017// CHECK: private unnamed_addr constant [14 x i8] c"v16@0:8{?=}16
18// CHECK: private unnamed_addr constant [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
Fariborz Jahanian271b8d42012-06-29 22:54:56 +000019
Fariborz Jahaniand4c1a202013-02-15 21:14:50 +000020
21// rdar://13190095
22@interface NSObject @end
23
24@class BABugExample;
25typedef BABugExample BABugExampleRedefinition;
26
27@interface BABugExample : NSObject {
28 BABugExampleRedefinition *_property; // .asciz "^{BABugExample=^{BABugExample}}"
29}
30@property (copy) BABugExampleRedefinition *property;
31@end
32
33@implementation BABugExample
34@synthesize property = _property;
35@end
36
Saleem Abdulrasool3f307512016-09-18 16:12:14 +000037// CHECK: private unnamed_addr constant [24 x i8] c"^{BABugExample=@}16
Fariborz Jahanian88890e72013-07-12 16:19:11 +000038
39// rdar://14408244
40@class SCNCamera;
41typedef SCNCamera C3DCamera;
42typedef struct
43{
44 C3DCamera *presentationInstance;
45} C3DCameraStorage;
46
47@interface SCNCamera
48@end
49
50@implementation SCNCamera
51{
52 C3DCameraStorage _storage;
53}
54@end
Saleem Abdulrasool3f307512016-09-18 16:12:14 +000055// CHECK: private unnamed_addr constant [39 x i8] c"{?=\22presentationInstance\22^{SCNCamera}}\00"
Fariborz Jahanian9da2a792014-04-23 17:44:58 +000056
57// rdar://16655340
58int i;
59typeof(@encode(typeof(i))) e = @encode(typeof(i));
60const char * Test()
61{
62 return e;
63}
64// CHECK: @e = global [2 x i8] c"i\00", align 1
65// CHECK: define i8* @Test()
David Blaikiebdf40a62015-03-13 18:21:46 +000066// CHECK: ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @e, i32 0, i32 0)