// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fms-extensions -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s
// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fms-extensions -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s
typedef struct A A;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct A
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 4:0-21 | int a
// CHECK-NEXT: 8:- | int
// CHECK-NEXT: 8:0-9 | int c
// CHECK-NEXT: 12:0-2 | char b
// CHECK-NEXT: 12:3-6 | char d
// CHECK-NEXT: 14 | short y
// CHECK-NEXT: | [sizeof=16, align=4]
typedef struct B B;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct B
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:- | int
// CHECK-NEXT: 2:0-3 | short a
// CHECK-NEXT: 4 | char y
// CHECK-NEXT: | [sizeof=6, align=2]
typedef struct C C;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct C
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 2:0-3 | short a
// CHECK-NEXT: 4:- | int
// CHECK-NEXT: 4 | char y
// CHECK-NEXT: | [sizeof=8, align=4]
typedef struct D D;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct D
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:- | short
// CHECK-NEXT: 1:- | int
// CHECK-NEXT: 1 | char y
// CHECK-NEXT: | [sizeof=2, align=1]
typedef union E E;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | union E
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 0:0-2 | long long a
// CHECK-NEXT: 0:0-2 | int b
// CHECK-NEXT: 0:- | long long
// CHECK-NEXT: 0 | short
// CHECK-NEXT: | [sizeof=8, align=2]
typedef struct F F;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct F
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:0-2 | char a
// CHECK-NEXT: 1:3-5 | char b
// CHECK-NEXT: 2:0-2 | char c
// CHECK-NEXT: 4:0-5 | short d
// CHECK-NEXT: 4:6-11 | short e
// CHECK-NEXT: 6:0-5 | short f
// CHECK-NEXT: 8:0-10 | short g
// CHECK-NEXT:10:0-10 | short h
// CHECK-NEXT:12:0-10 | short i
// CHECK-NEXT: 14 | short y
// CHECK-NEXT: | [sizeof=16, align=2]
typedef union G G;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | union G
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 0:0-2 | int a
// CHECK-NEXT: 0:- | int
// CHECK-NEXT: 0:- | long long
// CHECK-NEXT: 0 | short y
// CHECK-NEXT: | [sizeof=4, align=2]
typedef struct H H;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct H
// CHECK-NEXT: 0:0-0 | unsigned short a
// CHECK-NEXT: 2:- | unsigned char
// CHECK-NEXT: 2:- | unsigned long
// CHECK-NEXT: 2:0-0 | unsigned short c
// CHECK-NEXT: | [sizeof=4, align=2]
typedef struct I I;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct I
// CHECK-NEXT: 0:0-7 | short
// CHECK-NEXT: 1:0-7 | short
// CHECK-NEXT: | [sizeof=2, align=2]
typedef struct A1 A1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct A1
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:0-21 | int a
// CHECK-NEXT: 5:- | int
// CHECK-NEXT: 5:0-9 | int c
// CHECK-NEXT: 9:0-2 | char b
// CHECK-NEXT: 9:3-6 | char d
// CHECK-NEXT: 10 | short y
// CHECK-NEXT: | [sizeof=12, align=1]
typedef struct B1 B1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct B1
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:- | int
// CHECK-NEXT: 1:0-3 | short
// CHECK-NEXT: 3 | char y
// CHECK-NEXT: | [sizeof=4, align=1]
typedef struct C1 C1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct C1
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:0-3 | short
// CHECK-NEXT: 3:- | int
// CHECK-NEXT: 3 | char y
// CHECK-NEXT: | [sizeof=4, align=1]
typedef struct D1 D1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct D1
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:- | short
// CHECK-NEXT: 1:- | int
// CHECK-NEXT: 1 | char y
// CHECK-NEXT: | [sizeof=2, align=1]
typedef union E1 E1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | union E1
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 0:0-2 | long long a
// CHECK-NEXT: 0:0-2 | int b
// CHECK-NEXT: 0:- | long long
// CHECK-NEXT: 0 | short y
// CHECK-NEXT: | [sizeof=8, align=1]
typedef struct F1 F1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct F1
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 1:0-2 | char a
// CHECK-NEXT: 1:3-5 | char b
// CHECK-NEXT: 2:0-2 | char c
// CHECK-NEXT: 3:0-5 | short d
// CHECK-NEXT: 3:6-11 | short e
// CHECK-NEXT: 5:0-5 | short f
// CHECK-NEXT: 7:0-10 | short g
// CHECK-NEXT: 9:0-10 | short h
// CHECK-NEXT:11:0-10 | short i
// CHECK-NEXT: 13 | short y
// CHECK-NEXT: | [sizeof=15, align=1]
typedef union G1 G1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | union G1
// CHECK-NEXT: 0 | char x
// CHECK-NEXT: 0:0-2 | int a
// CHECK-NEXT: 0:- | int
// CHECK-NEXT: 0:- | long long
// CHECK-NEXT: 0 | short y
// CHECK-NEXT: | [sizeof=4, align=1]
typedef struct H1 H1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct H1
// CHECK-NEXT: 0:0-0 | unsigned long a
// CHECK-NEXT: 4:- | unsigned char
// CHECK-NEXT: 4:- | unsigned long
// CHECK-NEXT: 4:0-0 | unsigned long c
// CHECK-NEXT: | [sizeof=8, align=1]
typedef struct I1 I1;
// CHECK:*** Dumping AST Record Layout
// CHECK-NEXT: 0 | struct I1
// CHECK-NEXT: 0:0-7 | short
// CHECK-NEXT: 1:0-7 | short
// CHECK-NEXT: | [sizeof=2, align=1]
int x;