Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Layout / ms_struct-bitfields.c
blob41f4d71ceac5a0b38032101022053300c15863c4
1 // RUN: %clang_cc1 -emit-llvm-only -triple armv7-apple-darwin -fdump-record-layouts %s 2>/dev/null \
2 // RUN: | FileCheck %s
4 #pragma ms_struct on
6 union A {
7 unsigned long long x : 32;
8 unsigned long long y : 32;
9 } a;
10 // CHECK:*** Dumping AST Record Layout
11 // CHECK-NEXT: 0 | union A
12 // CHECK-NEXT: 0:0-31 | unsigned long long x
13 // CHECK-NEXT: 0:0-31 | unsigned long long y
14 // CHECK-NEXT: | [sizeof=8, align=1]
16 union B {
17 __attribute__((aligned(4)))
18 unsigned long long x : 32;
19 unsigned long long y : 32;
20 } b;
21 // CHECK:*** Dumping AST Record Layout
22 // CHECK-NEXT: 0 | union B
23 // CHECK-NEXT: 0:0-31 | unsigned long long x
24 // CHECK-NEXT: 0:0-31 | unsigned long long y
25 // CHECK-NEXT: | [sizeof=8, align=1]
27 union C {
28 unsigned long long : 0;
29 unsigned short y : 8;
30 } c;
31 // CHECK:*** Dumping AST Record Layout
32 // CHECK-NEXT: 0 | union C
33 // CHECK-NEXT: 0:- | unsigned long long
34 // CHECK-NEXT: 0:0-7 | unsigned short y
35 // CHECK-NEXT: | [sizeof=2, align=1]
37 union D {
38 unsigned long long : 0;
39 unsigned short : 0;
40 } d;
41 // CHECK:*** Dumping AST Record Layout
42 // CHECK-NEXT: 0 | union D
43 // CHECK-NEXT: 0:- | unsigned long long
44 // CHECK-NEXT: 0:- | unsigned short
45 // CHECK-NEXT: | [sizeof=1, align=1]