summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/vtable-layout.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2016-12-20 22:22:24 +0000
committerPaul Robinson <paul.robinson@sony.com>2016-12-20 22:22:24 +0000
commit768efe7b26a100e77ff5e809609d5a373c113076 (patch)
tree5bb6a1c15530b5bd7db6e797170d39df83c4daa7 /test/CodeGenCXX/vtable-layout.cpp
parentc8c1a1961a459f5f79ba8dfb08a2d53d5443bf32 (diff)
Make two vtable tests tolerate C++11.
In C++11 we don't emit vtables as eagerly as we do for C++03, so fiddle the tests to emit them when the test expects them. Differential Revision: http://reviews.llvm.org/D27994 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290205 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/vtable-layout.cpp')
-rw-r--r--test/CodeGenCXX/vtable-layout.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/CodeGenCXX/vtable-layout.cpp b/test/CodeGenCXX/vtable-layout.cpp
index ca5384d6e0..4a47e3c9d2 100644
--- a/test/CodeGenCXX/vtable-layout.cpp
+++ b/test/CodeGenCXX/vtable-layout.cpp
@@ -1919,6 +1919,8 @@ namespace Test40 {
virtual int i(int);
virtual int i();
};
+ // Force C's vtable to be generated.
+ int C::f() { return 1; }
class D : C {};