blob: 91e77519a9a1680164b8efded530ba3a709bc716 [file] [log] [blame]
Daniel Dunbar5a5a8032009-05-03 21:05:10 +00001// RUNX: llvm-gcc -m64 -fobjc-gc -emit-llvm -S -o %t %s &&
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: clang-cc -triple x86_64-apple-darwin9 -fobjc-gc -emit-llvm -o %t %s
3// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"A\\00"' %t
4// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\11q\\10\\00"' %t
5// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"!q\\00"' %t
6// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\01\\14\\00"' %t
Daniel Dunbar5a5a8032009-05-03 21:05:10 +00007// RUN: true
8
9/*
10
11Here is a handy command for looking at llvm-gcc's output:
12llvm-gcc -m64 -fobjc-gc -emit-llvm -S -o - ivar-layout-64.m | \
13 grep 'OBJC_CLASS_NAME.* =.*global' | \
14 sed -e 's#, section.*# ...#' | \
Daniel Dunbar37153282009-05-04 04:10:48 +000015 sed -e 's#_[0-9]*"#_NNN#' | \
Daniel Dunbar5a5a8032009-05-03 21:05:10 +000016 sort
17
18*/
19
20@interface B @end
21
22@interface A {
23 struct s0 {
24 int f0;
25 int f1;
26 } f0;
27 id f1;
28__weak B *f2;
29 int f3 : 5;
30 struct s1 {
31 int *f0;
32 int *f1;
33 } f4[2][1];
34}
35@end
36
Daniel Dunbar37153282009-05-04 04:10:48 +000037@interface C : A
38@property int p3;
39@end
40
41@implementation C
42@synthesize p3 = _p3;
43@end
44
Daniel Dunbar5a5a8032009-05-03 21:05:10 +000045@interface A()
46@property int p0;
47@property (assign) __strong id p1;
48@property (assign) __weak id p2;
49@end
50
Daniel Dunbar37153282009-05-04 04:10:48 +000051// FIXME: Check layout for this class, once it is clear what the right
52// answer is.
Daniel Dunbar5a5a8032009-05-03 21:05:10 +000053@implementation A
Daniel Dunbar37153282009-05-04 04:10:48 +000054@synthesize p0 = _p0;
55@synthesize p1 = _p1;
56@synthesize p2 = _p2;
57@end
58
59@interface D : A
60@property int p3;
61@end
62
63// FIXME: Check layout for this class, once it is clear what the right
64// answer is.
65@implementation D
66@synthesize p3 = _p3;
Daniel Dunbar5a5a8032009-05-03 21:05:10 +000067@end
Fariborz Jahanian31fa7d72009-05-04 21:46:27 +000068
69typedef unsigned short UInt16;
70
71
72typedef signed char BOOL;
73typedef unsigned int FSCatalogInfoBitmap;
74
75@interface NSFileLocationComponent {
76 @private
77
78 id _specifierOrStandardizedPath;
79 BOOL _carbonCatalogInfoAndNameAreValid;
80 FSCatalogInfoBitmap _carbonCatalogInfoMask;
81 id _name;
82 id _containerComponent;
83 id _presentableName;
84 id _iconAsAttributedString;
85}
86@end
87
88@implementation NSFileLocationComponent @end
89