xref: /llvm-project/clang/test/CodeGenCXX/speculative-vtt.cpp (revision c195c25b224e26d876e1fb5ab644f615af9638df)
1*c195c25bSRichard Smith // RUN: %clang_cc1 -triple x86_64-linux-gnu %s -O2 -disable-llvm-passes -emit-llvm -o - | FileCheck %s
2*c195c25bSRichard Smith struct A { virtual ~A(); };
3*c195c25bSRichard Smith template<typename T> struct B : virtual A {
~BB4*c195c25bSRichard Smith   ~B() override {}
5*c195c25bSRichard Smith };
6*c195c25bSRichard Smith struct C : B<int>, B<float> { C(); ~C() override; };
7*c195c25bSRichard Smith struct D : C { ~D() override; };
8*c195c25bSRichard Smith 
9*c195c25bSRichard Smith // We must not create a reference to B<int>::~B() here, because we're not going to emit it.
10*c195c25bSRichard Smith // CHECK-NOT: @_ZN1BIiED1Ev
11*c195c25bSRichard Smith // CHECK-NOT: @_ZTC1D0_1BIiE =
12*c195c25bSRichard Smith // CHECK-NOT: @_ZTT1D = available_externally
13*c195c25bSRichard Smith D *p = new D;
14