blob: e0eebe16e882b2d4aa3324f70370b57f20bf4257 [file] [log] [blame]
Daniel Dunbar3eec8aa2009-04-20 05:53:40 +00001// RUNX: llvm-gcc -m64 -emit-llvm -S -o %t %s &&
Daniel Dunbara5728872009-12-15 20:14:24 +00002// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00003// RUN: grep -F '@"OBJC_IVAR_$_I0._b0" = global i64 0, section "__DATA, __objc_const", align 8' %t
4// RUN: grep -F '@"OBJC_IVAR_$_I0._b1" = global i64 0, section "__DATA, __objc_const", align 8' %t
5// RUN: grep -F '@"OBJC_IVAR_$_I0._b2" = global i64 1, section "__DATA, __objc_const", align 8' %t
6// RUN: grep -F '@"OBJC_IVAR_$_I0._x" = global i64 2, section "__DATA, __objc_const", align 8' %t
7// RUN: grep -F '@"OBJC_IVAR_$_I0._b3" = global i64 4, section "__DATA, __objc_const", align 8' %t
8// RUN: grep -F '@"OBJC_IVAR_$_I0._y" = global i64 6, section "__DATA, __objc_const", align 8' %t
9// RUN: grep -F '@"OBJC_IVAR_$_I0._b4" = global i64 7, section "__DATA, __objc_const", align 8' %t
10// RUN: grep -F '@"OBJC_IVAR_$_I0." = global' %t | count 0
Daniel Dunbar48fa0642009-04-19 02:03:42 +000011
12@interface I0 {
13 unsigned _b0:4;
14 unsigned _b1:5;
15 unsigned _b2:5;
16 char _x;
17 unsigned _b3:9;
18 char _y;
19 char _b4:3;
Daniel Dunbar3eec8aa2009-04-20 05:53:40 +000020 char : 0;
Daniel Dunbar48fa0642009-04-19 02:03:42 +000021}
22@end
23
24@implementation I0
25@end