• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
2 // RUN:            | FileCheck %s
3 // RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
4 // RUN:            | FileCheck %s -check-prefix CHECK-X64
5 
6 struct T0 { char c; };
7 struct T2 : virtual T0 { };
8 struct T3 { T2 a[1]; char c; };
9 
10 // CHECK: *** Dumping AST Record Layout
11 // CHECK: *** Dumping AST Record Layout
12 // CHECK: *** Dumping AST Record Layout
13 // CHECK-NEXT:    0 | struct T3
14 // CHECK-NEXT:    0 |   struct T2 [1] a
15 // CHECK-NEXT:    5 |   char c
16 // CHECK-NEXT:      | [sizeof=8, align=4
17 // CHECK-NEXT:      |  nvsize=8, nvalign=4]
18 // CHECK-X64: *** Dumping AST Record Layout
19 // CHECK-X64: *** Dumping AST Record Layout
20 // CHECK-X64: *** Dumping AST Record Layout
21 // CHECK-X64-NEXT:    0 | struct T3
22 // CHECK-X64-NEXT:    0 |   struct T2 [1] a
23 // CHECK-X64-NEXT:   16 |   char c
24 // CHECK-X64-NEXT:      | [sizeof=24, align=8
25 // CHECK-X64-NEXT:      |  nvsize=24, nvalign=8]
26 
27 int a[sizeof(T3)];
28