• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; The following two object files were generated using the following command:
2;   $ cl /Z7 /c t.cpp
3; The contents of t.cpp follow:
4;   struct A {
5;     virtual void f();
6;   };
7;   struct B {
8;     virtual void f();
9;     virtual void g();
10;   };
11;   struct C {
12;     virtual void f();
13;     virtual void g();
14;     virtual void h();
15;   };
16;   A a;
17;   B b;
18;   C c;
19
20RUN: llvm-readobj -codeview %p/Inputs/codeview-vftable.obj.coff | FileCheck %s
21
22CHECK:       VFTable (0x10F0) {
23CHECK-NEXT:    TypeLeafKind: LF_VFTABLE (0x151D)
24CHECK-NEXT:    CompleteClass: A
25CHECK-NEXT:    OverriddenVFTable: 0x0
26CHECK-NEXT:    VFPtrOffset: 0x0
27CHECK-NEXT:    VFTableName: ??_7A@@6B@
28CHECK-NEXT:    MethodName: ?f@A@@UEAAXXZ
29CHECK-NEXT:  }
30CHECK-NEXT:  VFTable (0x10F1) {
31CHECK-NEXT:    TypeLeafKind: LF_VFTABLE (0x151D)
32CHECK-NEXT:    CompleteClass: B
33CHECK-NEXT:    OverriddenVFTable: ??_7A@@6B@ (0x10F0)
34CHECK-NEXT:    VFPtrOffset: 0x0
35CHECK-NEXT:    VFTableName: ??_7B@@6B@
36CHECK-NEXT:    MethodName: ?f@B@@UEAAXXZ
37CHECK-NEXT:    MethodName: ?g@B@@UEAAXXZ
38CHECK-NEXT:  }
39CHECK-NEXT:  VFTable (0x10F2) {
40CHECK-NEXT:    TypeLeafKind: LF_VFTABLE (0x151D)
41CHECK-NEXT:    CompleteClass: C
42CHECK-NEXT:    OverriddenVFTable: ??_7B@@6B@ (0x10F1)
43CHECK-NEXT:    VFPtrOffset: 0x0
44CHECK-NEXT:    VFTableName: ??_7C@@6B@
45CHECK-NEXT:    MethodName: ?f@C@@UEAAXXZ
46CHECK-NEXT:    MethodName: ?g@C@@UEAAXXZ
47CHECK-NEXT:    MethodName: ?h@C@@UEAAXXZ
48CHECK-NEXT:  }
49