2009-03-24 10:24:46 +08:00
|
|
|
// RUN: clang-cc -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
|
2008-12-20 07:34:38 +08:00
|
|
|
// RUN: grep -e "\^{Innermost=CC}" %t | count 1 &&
|
2009-07-23 01:14:51 +08:00
|
|
|
// RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1 &&
|
|
|
|
// RUN: grep -e "{B1=#@c}" %t | count 1 &&
|
2009-04-27 09:55:56 +08:00
|
|
|
// RUN: grep -e "v12@0:4\[3\[4@]]8" %t | count 1 &&
|
2008-12-28 23:48:05 +08:00
|
|
|
// RUN: grep -e "r\^{S=i}" %t | count 1 &&
|
2008-12-24 05:30:15 +08:00
|
|
|
// RUN: grep -e "\^{Object=#}" %t | count 1
|
2008-12-20 01:45:06 +08:00
|
|
|
|
|
|
|
@class Int1;
|
|
|
|
|
|
|
|
struct Innermost {
|
|
|
|
unsigned char a, b;
|
|
|
|
};
|
|
|
|
|
|
|
|
@interface Int1 {
|
|
|
|
signed char a, b;
|
|
|
|
struct Innermost *innermost;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Int1
|
|
|
|
@end
|
2008-12-20 07:34:38 +08:00
|
|
|
|
|
|
|
@interface Base
|
|
|
|
{
|
|
|
|
struct objc_class *isa;
|
|
|
|
int full;
|
|
|
|
int full2: 32;
|
|
|
|
int _refs: 8;
|
|
|
|
int field2: 3;
|
|
|
|
unsigned f3: 8;
|
|
|
|
short cc;
|
|
|
|
unsigned g: 16;
|
|
|
|
int r2: 8;
|
|
|
|
int r3: 8;
|
|
|
|
int r4: 2;
|
|
|
|
int r5: 8;
|
|
|
|
char c;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface Derived: Base
|
|
|
|
{
|
|
|
|
char d;
|
|
|
|
int _field3: 6;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Base
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Derived
|
|
|
|
@end
|
|
|
|
|
2008-12-21 03:17:01 +08:00
|
|
|
@interface B1
|
|
|
|
{
|
|
|
|
struct objc_class *isa;
|
|
|
|
Int1 *sBase;
|
|
|
|
char c;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation B1
|
|
|
|
@end
|
|
|
|
|
2008-12-21 07:29:59 +08:00
|
|
|
@interface Test
|
|
|
|
{
|
|
|
|
int ivar;
|
|
|
|
}
|
2009-04-27 09:55:56 +08:00
|
|
|
-(void) test3: (Test* [3] [4])b ;
|
2008-12-21 07:29:59 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation Test
|
2009-04-27 09:55:56 +08:00
|
|
|
-(void) test3: (Test* [3] [4])b {}
|
2008-12-21 07:29:59 +08:00
|
|
|
@end
|
|
|
|
|
2008-12-23 07:22:27 +08:00
|
|
|
struct S { int iS; };
|
2008-12-21 07:29:59 +08:00
|
|
|
|
2008-12-24 05:30:15 +08:00
|
|
|
@interface Object
|
|
|
|
{
|
|
|
|
Class isa;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
typedef Object MyObj;
|
|
|
|
|
2008-12-20 07:34:38 +08:00
|
|
|
int main()
|
|
|
|
{
|
|
|
|
const char *en = @encode(Derived);
|
2008-12-21 03:17:01 +08:00
|
|
|
const char *eb = @encode(B1);
|
2008-12-23 07:22:27 +08:00
|
|
|
const char *es = @encode(const struct S *);
|
|
|
|
const char *ec = @encode(const struct S);
|
2008-12-24 05:30:15 +08:00
|
|
|
const char *ee = @encode(MyObj *const);
|
2008-12-20 07:34:38 +08:00
|
|
|
}
|
|
|
|
|