1 // RUN: %clang_cc1 -x c -debug-info-kind=limited -emit-llvm -triple x86_64-apple-darwin -o - %s | FileCheck %s
3 // CHECK: %struct.layout3 = type <{ i8, [3 x i8], %struct.size8_pack4, i8, [3 x i8] }>
4 // CHECK: %struct.layout0 = type { i8, %struct.size8, i8 }
5 // CHECK: %struct.layout1 = type <{ i8, %struct.size8_anon, i8, [2 x i8] }>
6 // CHECK: %struct.layout2 = type <{ i8, %struct.size8_pack1, i8 }>
8 // ---------------------------------------------------------------------
10 // ---------------------------------------------------------------------
21 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs8",
22 // CHECK-SAME: {{.*}}size: 64, offset: 64)
23 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l0_ofs16",
24 // CHECK-SAME: {{.*}}size: 1, offset: 128, flags: DIFlagBitField, extraData: i64 128)
27 // ---------------------------------------------------------------------
29 // ---------------------------------------------------------------------
36 struct size8_anon l1_ofs1
;
40 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs1",
41 // CHECK-SAME: {{.*}}size: 64, offset: 8)
42 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l1_ofs9",
43 // CHECK-SAME: {{.*}}size: 1, offset: 72, flags: DIFlagBitField, extraData: i64 72)
46 // ---------------------------------------------------------------------
48 // ---------------------------------------------------------------------
56 struct size8_pack1 l2_ofs1
;
61 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs1",
62 // CHECK-SAME: {{.*}}size: 64, offset: 8)
63 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l2_ofs9",
64 // CHECK-SAME: {{.*}}size: 1, offset: 72, flags: DIFlagBitField, extraData: i64 72)
68 // ---------------------------------------------------------------------
69 // Explicitly packed with different alignment.
70 // ---------------------------------------------------------------------
78 struct size8_pack4 l3_ofs4
;
83 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs4",
84 // CHECK-SAME: {{.*}}size: 64, offset: 32)
85 // CHECK: !DIDerivedType(tag: DW_TAG_member, name: "l3_ofs12",
86 // CHECK-SAME: {{.*}}size: 1, offset: 96, flags: DIFlagBitField, extraData: i64 96)