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