1; REQUIRES: diasdk
2
3; RUN: llvm-pdbutil pretty -all -class-recurse-depth=1 \
4; RUN:   %p/Inputs/ClassLayoutTest.pdb > %t
5; RUN: FileCheck -input-file=%t %s -check-prefix=GLOBALS_TEST
6; RUN: FileCheck -input-file=%t %s -check-prefix=MEMBERS_TEST
7; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_A
8; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_B
9; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_C
10; RUN: FileCheck -input-file=%t %s -check-prefix=BASE_CLASS_D
11; RUN: FileCheck -input-file=%t %s -check-prefix=UDT_KIND_TEST
12; RUN: FileCheck -input-file=%t %s -check-prefix=BITFIELD_TEST
13
14; GLOBALS_TEST: ---GLOBALS---
15; GLOBALS_TEST-DAG: int GlobalsTest::IntVar
16; GLOBALS_TEST-DAG: double GlobalsTest::DoubleVar
17; GLOBALS_TEST-DAG: GlobalsTest::Enum GlobalsTest::EnumVar
18
19; MEMBERS_TEST: ---TYPES---
20; MEMBERS_TEST: class MembersTest::A [sizeof = 16] {
21; MEMBERS_TEST-DAG: typedef int NestedTypedef
22; MEMBERS_TEST-DAG: enum NestedEnum
23; MEMBERS_TEST: void {{(MembersTest::A::)?}}MemberFunc()
24; MEMBERS_TEST-DAG: data +0x00 [sizeof=4] int IntMemberVar
25; MEMBERS_TEST-NEXT: <padding> (4 bytes)
26; MEMBERS_TEST-NEXT: data +0x08 [sizeof=8] double DoubleMemberVar
27; MEMBERS_TEST: }
28
29; BASE_CLASS_A: ---TYPES---
30; BASE_CLASS_A: class BaseClassTest::A [sizeof = 1] {}
31
32; BASE_CLASS_B: ---TYPES---
33; BASE_CLASS_B: class BaseClassTest::B [sizeof = 4]
34; BASE_CLASS_B-NEXT: : public virtual BaseClassTest::A {
35
36; BASE_CLASS_C: ---TYPES---
37; BASE_CLASS_C: class BaseClassTest::C [sizeof = 4]
38; BASE_CLASS_C-NEXT: : public virtual BaseClassTest::A {
39
40; BASE_CLASS_D: ---TYPES---
41; BASE_CLASS_D: class BaseClassTest::D [sizeof = 8]
42; BASE_CLASS_D-NEXT: protected BaseClassTest::B
43; BASE_CLASS_D-NEXT: private BaseClassTest::C
44
45; UDT_KIND_TEST: ---TYPES---
46; UDT_KIND_TEST-DAG: union UdtKindTest::C [sizeof = 1] {}
47; UDT_KIND_TEST-DAG: class UdtKindTest::B [sizeof = 1] {}
48; UDT_KIND_TEST-DAG: struct UdtKindTest::A [sizeof = 1] {}
49
50; BITFIELD_TEST: ---TYPES---
51; BITFIELD_TEST: struct BitFieldTest::A [sizeof = 8] {
52; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits1 : 1
53; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits2 : 2
54; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits3 : 3
55; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits4 : 4
56; BITFIELD_TEST-NEXT: +0x00 [sizeof=4] int Bits22 : 22
57; BITFIELD_TEST-NEXT: +0x04 [sizeof=4] int Offset0x04
58