1 // RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -fdump-record-layouts \
2 // RUN: -fsyntax-only %s | \
5 // RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -fdump-record-layouts \
6 // RUN: -fsyntax-only %s | \
15 // CHECK: *** Dumping AST Record Layout
16 // CHECK-NEXT: 0 | struct Empty (empty)
17 // CHECK-NEXT: | [sizeof=1, dsize=1, align=1, preferredalign=1,
18 // CHECK-NEXT: | nvsize=1, nvalign=1, preferrednvalign=1]
20 // CHECK: *** Dumping AST Record Layout
21 // CHECK-NEXT: 0 | struct A
22 // CHECK-NEXT: 0 | double d
23 // CHECK-NEXT: | [sizeof=8, dsize=8, align=4, preferredalign=8,
24 // CHECK-NEXT: | nvsize=8, nvalign=4, preferrednvalign=8]
35 [[no_unique_address
]] B b
;
39 // CHECK: *** Dumping AST Record Layout
40 // CHECK-NEXT: 0 | struct B
41 // CHECK-NEXT: 0 | struct Empty emp (empty)
42 // CHECK-NEXT: 4 | struct A a
43 // CHECK-NEXT: 4 | double d
44 // CHECK-NEXT: 12 | char c
45 // CHECK-NEXT: | [sizeof=16, dsize=13, align=4, preferredalign=4,
46 // CHECK-NEXT: | nvsize=13, nvalign=4, preferrednvalign=4]
48 // CHECK: *** Dumping AST Record Layout
49 // CHECK-NEXT: 0 | struct B1
50 // CHECK-NEXT: 0 | struct B b
51 // CHECK-NEXT: 0 | struct Empty emp (empty)
52 // CHECK-NEXT: 4 | struct A a
53 // CHECK-NEXT: 4 | double d
54 // CHECK-NEXT: 12 | char c
55 // CHECK-NEXT: 13 | char[7] ext
56 // CHECK-NEXT: | [sizeof=20, dsize=20, align=4, preferredalign=4,
57 // CHECK-NEXT: | nvsize=20, nvalign=4, preferrednvalign=4]
62 [[no_unique_address
]] Empty emp
;
68 [[no_unique_address
]] C c
;
72 // CHECK: *** Dumping AST Record Layout
73 // CHECK-NEXT: 0 | struct C
74 // CHECK-NEXT: 0 | struct Empty emp (empty)
75 // CHECK-NEXT: 0 | struct A a
76 // CHECK-NEXT: 0 | double d
77 // CHECK-NEXT: 8 | char c
78 // CHECK-NEXT: | [sizeof=16, dsize=9, align=4, preferredalign=8,
79 // CHECK-NEXT: | nvsize=9, nvalign=4, preferrednvalign=8]
81 // CHECK: *** Dumping AST Record Layout
82 // CHECK-NEXT: 0 | struct C1
83 // CHECK-NEXT: 0 | struct C c
84 // CHECK-NEXT: 0 | struct Empty emp (empty)
85 // CHECK-NEXT: 0 | struct A a
86 // CHECK-NEXT: 0 | double d
87 // CHECK-NEXT: 8 | char c
88 // CHECK-NEXT: 9 | char[7] ext
89 // CHECK-NEXT: | [sizeof=16, dsize=16, align=4, preferredalign=8,
90 // CHECK-NEXT: | nvsize=16, nvalign=4, preferrednvalign=8]
95 [[no_unique_address
]] char notEmp
;
101 [[no_unique_address
]] D d
;
105 // CHECK: *** Dumping AST Record Layout
106 // CHECK-NEXT: 0 | struct D
107 // CHECK-NEXT: 0 | char notEmp
108 // CHECK-NEXT: 4 | struct A a
109 // CHECK-NEXT: 4 | double d
110 // CHECK-NEXT: 12 | char c
111 // CHECK-NEXT: | [sizeof=16, dsize=13, align=4, preferredalign=4,
112 // CHECK-NEXT: | nvsize=13, nvalign=4, preferrednvalign=4]
114 // CHECK: *** Dumping AST Record Layout
115 // CHECK-NEXT: 0 | struct D1
116 // CHECK-NEXT: 0 | struct D d
117 // CHECK-NEXT: 0 | char notEmp
118 // CHECK-NEXT: 4 | struct A a
119 // CHECK-NEXT: 4 | double d
120 // CHECK-NEXT: 12 | char c
121 // CHECK-NEXT: 13 | char[7] ext
122 // CHECK-NEXT: | [sizeof=20, dsize=20, align=4, preferredalign=4,
123 // CHECK-NEXT: | nvsize=20, nvalign=4, preferrednvalign=4]
126 [[no_unique_address
]] Empty emp
;
131 // CHECK: *** Dumping AST Record Layout
132 // CHECK-NEXT: 0 | struct E
133 // CHECK-NEXT: 0 | struct Empty emp (empty)
134 // CHECK-NEXT: 0:- | int
135 // CHECK-NEXT: 0 | double d
136 // CHECK-NEXT: | [sizeof=8, dsize=8, align=4, preferredalign=4,
137 // CHECK-NEXT: | nvsize=8, nvalign=4, preferrednvalign=4]
140 [[no_unique_address
]] Empty emp
, emp2
;
144 // CHECK: *** Dumping AST Record Layout
145 // CHECK-NEXT: 0 | struct F
146 // CHECK-NEXT: 0 | struct Empty emp (empty)
147 // CHECK-NEXT: 1 | struct Empty emp2 (empty)
148 // CHECK-NEXT: 0 | double d
149 // CHECK-NEXT: | [sizeof=8, dsize=8, align=4, preferredalign=8,
150 // CHECK-NEXT: | nvsize=8, nvalign=4, preferrednvalign=8]
152 int a
= sizeof(Empty
);