summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/thunks.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-06-02 21:22:02 +0000
committerJohn McCall <rjmccall@apple.com>2010-06-02 21:22:02 +0000
commite21323588b32caf674213c9897dd12e2f0ea3cc5 (patch)
tree46dcd26e89f6864fd3df029a3fda46c01e7f0d1f /test/CodeGenCXX/thunks.cpp
parent79e5ab7a537987348a9ba01424d8bbe7080eac57 (diff)
Don't try to emit the vtable for a class just because we're emitting a
virtual function from it. Fixes PR7241. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105345 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/thunks.cpp')
-rw-r--r--test/CodeGenCXX/thunks.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGenCXX/thunks.cpp b/test/CodeGenCXX/thunks.cpp
index 79ca709f47..1de576128a 100644
--- a/test/CodeGenCXX/thunks.cpp
+++ b/test/CodeGenCXX/thunks.cpp
@@ -234,6 +234,18 @@ namespace Test8 {
void C::bar(NonPOD var) {}
}
+// PR7241: Emitting thunks for a method shouldn't require the vtable for
+// that class to be emitted.
+namespace Test9 {
+ struct A { virtual ~A() { } };
+ struct B : A { virtual void test() const {} };
+ struct C : B { C(); ~C(); };
+ struct D : C { D() {} };
+ void test() {
+ D d;
+ }
+}
+
/**** The following has to go at the end of the file ****/
// This is from Test5: