reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
; REQUIRES: diasdk

; RUN: llvm-pdbutil pretty -classes -class-definitions=layout \
; RUN:     -include-types=Test %p/Inputs/ComplexPaddingTest.pdb > %t

; RUN: FileCheck -input-file=%t %s -check-prefix=DIRECT_VB_ONLY
; RUN: FileCheck -input-file=%t %s -check-prefix=DIRECT_VB_AND_NON_VB
; RUN: FileCheck -input-file=%t %s -check-prefix=INDIRECT_VB
; RUN: FileCheck -input-file=%t %s -check-prefix=INDIRECT_AND_DIRECT_VB


; DIRECT_VB_ONLY:      struct TestIVBBase [sizeof = 16]
; DIRECT_VB_ONLY-NEXT:   : public virtual TestVB {
; DIRECT_VB_ONLY-NEXT:   vbptr +0x00 [sizeof=4]
; DIRECT_VB_ONLY-NEXT:   data +0x04 [sizeof=4] int A
; DIRECT_VB_ONLY-NEXT:   vbase +0x08 [sizeof=8] TestVB
; DIRECT_VB_ONLY-NEXT:     vfptr +0x08 [sizeof=4]
; DIRECT_VB_ONLY-NEXT:     data +0x0c [sizeof=4] int X
; DIRECT_VB_ONLY-NEXT: }

DIRECT_VB_AND_NON_VB:      struct TestVBLayout [sizeof = 24]
DIRECT_VB_AND_NON_VB-NEXT:   : public TestNVB
DIRECT_VB_AND_NON_VB-NEXT:   , public virtual TestVB {
DIRECT_VB_AND_NON_VB-NEXT:   base +0x00 [sizeof=8] TestNVB
DIRECT_VB_AND_NON_VB-NEXT:     vfptr +0x00 [sizeof=4]
DIRECT_VB_AND_NON_VB-NEXT:     data +0x04 [sizeof=4] int Y
DIRECT_VB_AND_NON_VB-NEXT:   vbptr +0x08 [sizeof=4]
DIRECT_VB_AND_NON_VB-NEXT:   data +0x0c [sizeof=4] int Z
DIRECT_VB_AND_NON_VB-NEXT:   vbase +0x10 [sizeof=8] TestVB
DIRECT_VB_AND_NON_VB-NEXT:     vfptr +0x10 [sizeof=4]
DIRECT_VB_AND_NON_VB-NEXT:     data +0x14 [sizeof=4] int X
DIRECT_VB_AND_NON_VB-NEXT: }

INDIRECT_VB:      struct TestIVBDerived [sizeof = 20]
INDIRECT_VB-NEXT:   : public TestIVBBase {
INDIRECT_VB-NEXT:   base +0x00 [sizeof=8] TestIVBBase
INDIRECT_VB-NEXT:     vbptr +0x00 [sizeof=4]
INDIRECT_VB-NEXT:     data +0x04 [sizeof=4] int A
INDIRECT_VB-NEXT:   data +0x08 [sizeof=4] int B
INDIRECT_VB-NEXT:   ivbase +0x0c [sizeof=8] TestVB
INDIRECT_VB-NEXT:     vfptr +0x0c [sizeof=4]
INDIRECT_VB-NEXT:     data +0x10 [sizeof=4] int X
INDIRECT_VB-NEXT: }

INDIRECT_AND_DIRECT_VB:      struct TestIVBMergedDerived [sizeof = 20]
INDIRECT_AND_DIRECT_VB-NEXT:   : public TestIVBBase
INDIRECT_AND_DIRECT_VB-NEXT:   , public virtual TestVB {
INDIRECT_AND_DIRECT_VB-NEXT:   base +0x00 [sizeof=8] TestIVBBase
INDIRECT_AND_DIRECT_VB-NEXT:     vbptr +0x00 [sizeof=4]
INDIRECT_AND_DIRECT_VB-NEXT:     data +0x04 [sizeof=4] int A
INDIRECT_AND_DIRECT_VB-NEXT:   data +0x08 [sizeof=4] int B
INDIRECT_AND_DIRECT_VB-NEXT:   vbase +0x0c [sizeof=8] TestVB
INDIRECT_AND_DIRECT_VB-NEXT:     vfptr +0x0c [sizeof=4]
INDIRECT_AND_DIRECT_VB-NEXT:     data +0x10 [sizeof=4] int X
INDIRECT_AND_DIRECT_VB-NEXT: }