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