1; REQUIRES: diasdk
2
3; RUN: llvm-pdbutil pretty -classes -class-definitions=layout \
4; RUN:     -include-types=Test %p/Inputs/ComplexPaddingTest.pdb > %t
5
6; RUN: FileCheck -input-file=%t %s -check-prefix=DIRECT_VB_ONLY
7; RUN: FileCheck -input-file=%t %s -check-prefix=DIRECT_VB_AND_NON_VB
8; RUN: FileCheck -input-file=%t %s -check-prefix=INDIRECT_VB
9; RUN: FileCheck -input-file=%t %s -check-prefix=INDIRECT_AND_DIRECT_VB
10
11
12; DIRECT_VB_ONLY:      struct TestIVBBase [sizeof = 16]
13; DIRECT_VB_ONLY-NEXT:   : public virtual TestVB {
14; DIRECT_VB_ONLY-NEXT:   vbptr +0x00 [sizeof=4]
15; DIRECT_VB_ONLY-NEXT:   data +0x04 [sizeof=4] int A
16; DIRECT_VB_ONLY-NEXT:   vbase +0x08 [sizeof=8] TestVB
17; DIRECT_VB_ONLY-NEXT:     vfptr +0x08 [sizeof=4]
18; DIRECT_VB_ONLY-NEXT:     data +0x0c [sizeof=4] int X
19; DIRECT_VB_ONLY-NEXT: }
20
21DIRECT_VB_AND_NON_VB:      struct TestVBLayout [sizeof = 24]
22DIRECT_VB_AND_NON_VB-NEXT:   : public TestNVB
23DIRECT_VB_AND_NON_VB-NEXT:   , public virtual TestVB {
24DIRECT_VB_AND_NON_VB-NEXT:   base +0x00 [sizeof=8] TestNVB
25DIRECT_VB_AND_NON_VB-NEXT:     vfptr +0x00 [sizeof=4]
26DIRECT_VB_AND_NON_VB-NEXT:     data +0x04 [sizeof=4] int Y
27DIRECT_VB_AND_NON_VB-NEXT:   vbptr +0x08 [sizeof=4]
28DIRECT_VB_AND_NON_VB-NEXT:   data +0x0c [sizeof=4] int Z
29DIRECT_VB_AND_NON_VB-NEXT:   vbase +0x10 [sizeof=8] TestVB
30DIRECT_VB_AND_NON_VB-NEXT:     vfptr +0x10 [sizeof=4]
31DIRECT_VB_AND_NON_VB-NEXT:     data +0x14 [sizeof=4] int X
32DIRECT_VB_AND_NON_VB-NEXT: }
33
34INDIRECT_VB:      struct TestIVBDerived [sizeof = 20]
35INDIRECT_VB-NEXT:   : public TestIVBBase {
36INDIRECT_VB-NEXT:   base +0x00 [sizeof=8] TestIVBBase
37INDIRECT_VB-NEXT:     vbptr +0x00 [sizeof=4]
38INDIRECT_VB-NEXT:     data +0x04 [sizeof=4] int A
39INDIRECT_VB-NEXT:   data +0x08 [sizeof=4] int B
40INDIRECT_VB-NEXT:   ivbase +0x0c [sizeof=8] TestVB
41INDIRECT_VB-NEXT:     vfptr +0x0c [sizeof=4]
42INDIRECT_VB-NEXT:     data +0x10 [sizeof=4] int X
43INDIRECT_VB-NEXT: }
44
45INDIRECT_AND_DIRECT_VB:      struct TestIVBMergedDerived [sizeof = 20]
46INDIRECT_AND_DIRECT_VB-NEXT:   : public TestIVBBase
47INDIRECT_AND_DIRECT_VB-NEXT:   , public virtual TestVB {
48INDIRECT_AND_DIRECT_VB-NEXT:   base +0x00 [sizeof=8] TestIVBBase
49INDIRECT_AND_DIRECT_VB-NEXT:     vbptr +0x00 [sizeof=4]
50INDIRECT_AND_DIRECT_VB-NEXT:     data +0x04 [sizeof=4] int A
51INDIRECT_AND_DIRECT_VB-NEXT:   data +0x08 [sizeof=4] int B
52INDIRECT_AND_DIRECT_VB-NEXT:   vbase +0x0c [sizeof=8] TestVB
53INDIRECT_AND_DIRECT_VB-NEXT:     vfptr +0x0c [sizeof=4]
54INDIRECT_AND_DIRECT_VB-NEXT:     data +0x10 [sizeof=4] int X
55INDIRECT_AND_DIRECT_VB-NEXT: }
56