[AMDGPU][True16][MC] update VOP1 dasm test with latest script (#120281)
[llvm-project.git] / clang / test / CodeGenCXX / microsoft-abi-vtables-multiple-nonvirtual-inheritance-pure-virtual.cpp
blob85022fc3c8586f9c96a49b1e6ada6c1b6b45bf51
1 // RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
2 // RUN: FileCheck %s < %t
3 // RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
5 struct A {
6 virtual void f();
7 };
9 struct B {
10 virtual void g() = 0;
11 virtual void h();
14 struct C : A, B {
15 // CHECK-LABEL: VFTable for 'A' in 'C' (1 entry)
16 // CHECK-NEXT: 0 | void A::f()
18 // CHECK-LABEL: VFTable for 'B' in 'C' (2 entries)
19 // CHECK-NEXT: 0 | void C::g()
20 // CHECK-NEXT: 1 | void B::h()
22 // CHECK-LABEL: VFTable indices for 'C' (1 entry).
23 // CHECK-NEXT: via vfptr at offset 4
24 // CHECK-NEXT: 0 | void C::g()
26 // MANGLING-DAG: @"??_7C@@6BA@@@"
27 // MANGLING-DAG: @"??_7C@@6BB@@@"
29 // Overrides only the right child's method (B::g),
30 // needs this adjustment but not thunks.
31 virtual void g();
34 C c;
35 void build_vftable(C *obj) { obj->g(); }