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
49 lines
1.9 KiB
C++
49 lines
1.9 KiB
C++
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -disable-O0-optnone -emit-llvm -o - %s | FileCheck %s
|
|
|
|
// CHECK: @_ZTV5TemplIiE = internal constant { [7 x ptr] } { [7 x ptr] [ptr null, ptr null, ptr @_ZN5TemplIiED1Ev, ptr @_ZN5TemplIiED0Ev, ptr @_ZN5TemplIiE1fEv, ptr @_ZN5TemplIiE1gEv, ptr null] }
|
|
|
|
struct B1 {
|
|
virtual ~B1();
|
|
};
|
|
|
|
B1::~B1() {}
|
|
|
|
void DELETE(B1 *pb1) {
|
|
pb1->B1::~B1();
|
|
}
|
|
// CHECK-LABEL: define{{.*}} void @_ZN2B1D0Ev
|
|
// CHECK: [[T1:%.*]] = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZTV2B1, i64 16)
|
|
// CHECK-NEXT: call void [[T1]](ptr {{[^,]*}} [[T2:%.*]])
|
|
// CHECK-LABEL: define{{.*}} void @_Z6DELETEP2B1
|
|
// CHECK: [[T3:%.*]] = load ptr, ptr getelementptr inbounds nuw (i8, ptr @_ZTV2B1, i64 16)
|
|
// CHECK-NEXT: call void [[T3]](ptr {{[^,]*}} [[T4:%.*]])
|
|
|
|
template<class T>
|
|
struct Templ {
|
|
virtual ~Templ(); // Out-of-line so that the destructor doesn't cause a vtable
|
|
virtual void f() {}
|
|
virtual void g() {}
|
|
};
|
|
template<class T>
|
|
struct SubTempl : public Templ<T> {
|
|
virtual ~SubTempl() {} // override
|
|
virtual void f() {} // override
|
|
virtual void g() {} // override
|
|
};
|
|
|
|
void f(SubTempl<int>* t) {
|
|
// Qualified calls go through the (qualified) vtable in apple-kext mode.
|
|
// Since t's this pointer points to SubTempl's vtable, the call needs
|
|
// to load Templ<int>'s vtable. Hence, Templ<int>::g needs to be
|
|
// instantiated in this TU, for it's referenced by the vtable.
|
|
// (This happens only in apple-kext mode; elsewhere virtual calls can always
|
|
// use the vtable pointer off this instead of having to load the vtable
|
|
// symbol.)
|
|
t->Templ::~Templ();
|
|
}
|
|
|
|
// CHECK: getelementptr inbounds nuw (i8, ptr @_ZTV5TemplIiE, i64 16)
|
|
// CHECK: declare void @_ZN5TemplIiED0Ev(ptr {{[^,]*}})
|
|
// CHECK: define internal void @_ZN5TemplIiE1fEv(ptr {{[^,]*}} %this)
|
|
// CHECK: define internal void @_ZN5TemplIiE1gEv(ptr {{[^,]*}} %this)
|