• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -fdump-record-layouts %s 2>/dev/null \
2 // RUN:            | FileCheck %s
3 
4 union A {
5   int f1: 3;
6   A();
7 };
8 
A()9 A::A() {}
10 
11 union B {
12   char f1: 35;
13   B();
14 };
15 
B()16 B::B() {}
17 
18 // CHECK:*** Dumping AST Record Layout
19 // CHECK-NEXT:     0 | union A
20 // CHECK-NEXT: 0:0-2 |   int f1
21 // CHECK-NEXT:       | [sizeof=4, dsize=1, align=4
22 // CHECK-NEXT:       |  nvsize=1, nvalign=4]
23 
24 // CHECK:*** Dumping AST Record Layout
25 // CHECK-NEXT:      0 | union B
26 // CHECK-NEXT: 0:0-34 |   char f1
27 // CHECK-NEXT:        | [sizeof=8, dsize=5, align=4
28 // CHECK-NEXT:        |  nvsize=5, nvalign=4]
29 
30