2009-05-04 05:05:10 +08:00
|
|
|
// RUNX: llvm-gcc -m64 -fobjc-gc -emit-llvm -S -o %t %s &&
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s
|
2009-11-08 09:45:36 +08:00
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"A\\00"' %t
|
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\11q\\10\\00"' %t
|
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"!q\\00"' %t
|
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\01\\14\\00"' %t
|
2010-05-20 07:07:54 +08:00
|
|
|
// RUNX: llvm-gcc -ObjC++ -m64 -fobjc-gc -emit-llvm -S -o %t %s &&
|
|
|
|
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-gc -emit-llvm -o %t %s
|
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"A\\00"' %t
|
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\11q\\10\\00"' %t
|
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"!q\\00"' %t
|
|
|
|
// RUN: grep '@"\\01L_OBJC_CLASS_NAME_.*" = internal global .* c"\\01\\14\\00"' %t
|
2009-05-04 05:05:10 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
Here is a handy command for looking at llvm-gcc's output:
|
|
|
|
llvm-gcc -m64 -fobjc-gc -emit-llvm -S -o - ivar-layout-64.m | \
|
|
|
|
grep 'OBJC_CLASS_NAME.* =.*global' | \
|
|
|
|
sed -e 's#, section.*# ...#' | \
|
2009-05-04 12:10:48 +08:00
|
|
|
sed -e 's#_[0-9]*"#_NNN#' | \
|
2009-05-04 05:05:10 +08:00
|
|
|
sort
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@interface B @end
|
|
|
|
|
|
|
|
@interface A {
|
|
|
|
struct s0 {
|
|
|
|
int f0;
|
|
|
|
int f1;
|
|
|
|
} f0;
|
|
|
|
id f1;
|
|
|
|
__weak B *f2;
|
|
|
|
int f3 : 5;
|
|
|
|
struct s1 {
|
|
|
|
int *f0;
|
|
|
|
int *f1;
|
|
|
|
} f4[2][1];
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
2009-05-04 12:10:48 +08:00
|
|
|
@interface C : A
|
|
|
|
@property int p3;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation C
|
|
|
|
@synthesize p3 = _p3;
|
|
|
|
@end
|
|
|
|
|
2009-05-04 05:05:10 +08:00
|
|
|
@interface A()
|
|
|
|
@property int p0;
|
|
|
|
@property (assign) __strong id p1;
|
|
|
|
@property (assign) __weak id p2;
|
|
|
|
@end
|
|
|
|
|
2009-05-04 12:10:48 +08:00
|
|
|
// FIXME: Check layout for this class, once it is clear what the right
|
|
|
|
// answer is.
|
2009-05-04 05:05:10 +08:00
|
|
|
@implementation A
|
2009-05-04 12:10:48 +08:00
|
|
|
@synthesize p0 = _p0;
|
|
|
|
@synthesize p1 = _p1;
|
|
|
|
@synthesize p2 = _p2;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface D : A
|
|
|
|
@property int p3;
|
|
|
|
@end
|
|
|
|
|
|
|
|
// FIXME: Check layout for this class, once it is clear what the right
|
|
|
|
// answer is.
|
|
|
|
@implementation D
|
|
|
|
@synthesize p3 = _p3;
|
2009-05-04 05:05:10 +08:00
|
|
|
@end
|
2009-05-05 05:46:27 +08:00
|
|
|
|
|
|
|
typedef unsigned short UInt16;
|
|
|
|
|
|
|
|
|
|
|
|
typedef signed char BOOL;
|
|
|
|
typedef unsigned int FSCatalogInfoBitmap;
|
|
|
|
|
|
|
|
@interface NSFileLocationComponent {
|
|
|
|
@private
|
|
|
|
|
|
|
|
id _specifierOrStandardizedPath;
|
|
|
|
BOOL _carbonCatalogInfoAndNameAreValid;
|
|
|
|
FSCatalogInfoBitmap _carbonCatalogInfoMask;
|
|
|
|
id _name;
|
|
|
|
id _containerComponent;
|
|
|
|
id _presentableName;
|
|
|
|
id _iconAsAttributedString;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation NSFileLocationComponent @end
|
|
|
|
|