Files
TheRock/compiler/amd-llvm/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-vdtors.cpp
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

95 lines
2.6 KiB
C++

// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
// RUN: FileCheck %s < %t
struct A {
virtual ~A();
virtual void z1();
};
struct B {
virtual ~B();
};
struct C : A, B {
// CHECK-LABEL: VFTable for 'A' in 'C' (2 entries).
// CHECK-NEXT: 0 | C::~C() [vector deleting]
// CHECK-NEXT: 1 | void A::z1()
// CHECK-LABEL: VFTable for 'B' in 'C' (1 entry).
// CHECK-NEXT: 0 | C::~C() [vector deleting]
// CHECK-NEXT: [this adjustment: -4 non-virtual]
// CHECK-LABEL: Thunks for 'C::~C()' (1 entry).
// CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
// CHECK-LABEL: VFTable indices for 'C' (1 entry).
// CHECK-NEXT: 0 | C::~C() [vector deleting]
virtual ~C();
};
void build_vftable(C *obj) { delete obj; }
struct D {
// No virtual destructor here!
virtual void z4();
};
struct E : D, B {
// Implicit virtual dtor here!
// CHECK-LABEL: VFTable for 'D' in 'E' (1 entry).
// CHECK-NEXT: 0 | void D::z4()
// CHECK-LABEL: VFTable for 'B' in 'E' (1 entry).
// CHECK-NEXT: 0 | E::~E() [vector deleting]
// CHECK-NEXT: [this adjustment: -4 non-virtual]
// CHECK-LABEL: Thunks for 'E::~E()' (1 entry).
// CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
// CHECK-LABEL: VFTable indices for 'E' (1 entry).
// CHECK-NEXT: -- accessible via vfptr at offset 4 --
// CHECK-NEXT: 0 | E::~E() [vector deleting]
};
void build_vftable(E *obj) { delete obj; }
struct F : D, B {
// Implicit virtual dtor here!
// CHECK-LABEL: VFTable for 'D' in 'F' (1 entry).
// CHECK-NEXT: 0 | void D::z4()
// CHECK-LABEL: VFTable for 'B' in 'F' (1 entry).
// CHECK-NEXT: 0 | F::~F() [vector deleting]
// CHECK-NEXT: [this adjustment: -4 non-virtual]
// CHECK-LABEL: Thunks for 'F::~F()' (1 entry).
// CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
// CHECK-LABEL: VFTable indices for 'F' (1 entry).
// CHECK-NEXT: -- accessible via vfptr at offset 4 --
// CHECK-NEXT: 0 | F::~F() [vector deleting]
};
void build_vftable(F *obj) { delete obj; }
struct G : F {
// CHECK-LABEL: VFTable for 'D' in 'F' in 'G' (1 entry).
// CHECK-NEXT: 0 | void D::z4()
// CHECK-LABEL: VFTable for 'B' in 'F' in 'G' (1 entry).
// CHECK-NEXT: 0 | G::~G() [vector deleting]
// CHECK-NEXT: [this adjustment: -4 non-virtual]
// CHECK-LABEL: Thunks for 'G::~G()' (1 entry).
// CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
// CHECK-LABEL: VFTable indices for 'G' (1 entry).
// CHECK-NEXT: -- accessible via vfptr at offset 4 --
// CHECK-NEXT: 0 | G::~G() [vector deleting]
virtual ~G();
};
void build_vftable(G *obj) { delete obj; }