Home | History | Annotate | Download | only in llvm-pdbdump
      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 
     19 DIRECT_VB_AND_NON_VB:      struct TestVBLayout [sizeof = 24]
     20 DIRECT_VB_AND_NON_VB-NEXT:   : public TestNVB
     21 DIRECT_VB_AND_NON_VB-NEXT:   , public virtual TestVB {
     22 DIRECT_VB_AND_NON_VB-NEXT:   base +0x00 [sizeof=8] TestNVB
     23 DIRECT_VB_AND_NON_VB-NEXT:     vfptr +0x00 [sizeof=4]
     24 DIRECT_VB_AND_NON_VB-NEXT:     data +0x04 [sizeof=4] int Y
     25 DIRECT_VB_AND_NON_VB-NEXT:   vbptr +0x08 [sizeof=4]
     26 DIRECT_VB_AND_NON_VB-NEXT:   data +0x0c [sizeof=4] int Z
     27 DIRECT_VB_AND_NON_VB-NEXT:   vbase +0x10 [sizeof=8] TestVB
     28 DIRECT_VB_AND_NON_VB-NEXT:     vfptr +0x10 [sizeof=4]
     29 DIRECT_VB_AND_NON_VB-NEXT:     data +0x14 [sizeof=4] int X
     30 DIRECT_VB_AND_NON_VB-NEXT: }
     31 
     32 INDIRECT_VB:      struct TestIVBDerived [sizeof = 20]
     33 INDIRECT_VB-NEXT:   : public TestIVBBase {
     34 INDIRECT_VB-NEXT:   base +0x00 [sizeof=8] TestIVBBase
     35 INDIRECT_VB-NEXT:     vbptr +0x00 [sizeof=4]
     36 INDIRECT_VB-NEXT:     data +0x04 [sizeof=4] int A
     37 INDIRECT_VB-NEXT:   data +0x08 [sizeof=4] int B
     38 INDIRECT_VB-NEXT:   ivbase +0x0c [sizeof=8] TestVB
     39 INDIRECT_VB-NEXT:     vfptr +0x0c [sizeof=4]
     40 INDIRECT_VB-NEXT:     data +0x10 [sizeof=4] int X
     41 INDIRECT_VB-NEXT: }
     42 
     43 INDIRECT_AND_DIRECT_VB:      struct TestIVBMergedDerived [sizeof = 20]
     44 INDIRECT_AND_DIRECT_VB-NEXT:   : public TestIVBBase
     45 INDIRECT_AND_DIRECT_VB-NEXT:   , public virtual TestVB {
     46 INDIRECT_AND_DIRECT_VB-NEXT:   base +0x00 [sizeof=8] TestIVBBase
     47 INDIRECT_AND_DIRECT_VB-NEXT:     vbptr +0x00 [sizeof=4]
     48 INDIRECT_AND_DIRECT_VB-NEXT:     data +0x04 [sizeof=4] int A
     49 INDIRECT_AND_DIRECT_VB-NEXT:   data +0x08 [sizeof=4] int B
     50 INDIRECT_AND_DIRECT_VB-NEXT:   vbase +0x0c [sizeof=8] TestVB
     51 INDIRECT_AND_DIRECT_VB-NEXT:     vfptr +0x0c [sizeof=4]
     52 INDIRECT_AND_DIRECT_VB-NEXT:     data +0x10 [sizeof=4] int X
     53 INDIRECT_AND_DIRECT_VB-NEXT: }
     54