aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/speculative-vtt.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:04:05 +0000
commit676fbe8105eeb6ff4bb2ed261cb212fcfdbe7b63 (patch)
tree02a1ac369cb734d0abfa5000dd86e5b7797e6a74 /test/CodeGenCXX/speculative-vtt.cpp
parentc7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (diff)
Notes
Diffstat (limited to 'test/CodeGenCXX/speculative-vtt.cpp')
-rw-r--r--test/CodeGenCXX/speculative-vtt.cpp13
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;