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