diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-01-19 10:04:05 +0000 |
| commit | 676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch) | |
| tree | 02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/CodeGenCXX/speculative-vtt.cpp | |
| parent | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/speculative-vtt.cpp')
| -rw-r--r-- | test/CodeGenCXX/speculative-vtt.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGenCXX/speculative-vtt.cpp b/test/CodeGenCXX/speculative-vtt.cpp new file mode 100644 index 000000000000..120d95d4d482 --- /dev/null +++ b/test/CodeGenCXX/speculative-vtt.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -triple x86_64-linux-gnu %s -O2 -disable-llvm-passes -emit-llvm -o - | FileCheck %s +struct A { virtual ~A(); }; +template<typename T> struct B : virtual A { + ~B() override {} +}; +struct C : B<int>, B<float> { C(); ~C() override; }; +struct D : C { ~D() override; }; + +// We must not create a reference to B<int>::~B() here, because we're not going to emit it. +// CHECK-NOT: @_ZN1BIiED1Ev +// CHECK-NOT: @_ZTC1D0_1BIiE = +// CHECK-NOT: @_ZTT1D = available_externally +D *p = new D; |
