diff options
author | Anders Carlsson <andersca@mac.com> | 2010-04-10 18:42:27 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-04-10 18:42:27 +0000 |
commit | bdda6c1788dfdb890e1eccd13b949b1cc875eeaa (patch) | |
tree | 40ffd011b792224fa96ecc4dfc5185e14918dac4 /test/CodeGenCXX/vtable-layout.cpp | |
parent | c24b9c46558919e98f4398ecbd45bc7b05f9acd9 (diff) |
Simplify the virtual base layout code and fix a bug where we wouldn't store the offset for a virtual base.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100940 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/vtable-layout.cpp')
-rw-r--r-- | test/CodeGenCXX/vtable-layout.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGenCXX/vtable-layout.cpp b/test/CodeGenCXX/vtable-layout.cpp index 3a0dae41c3..1d34b240f3 100644 --- a/test/CodeGenCXX/vtable-layout.cpp +++ b/test/CodeGenCXX/vtable-layout.cpp @@ -1303,3 +1303,26 @@ struct B : virtual A { V2 *B::f() { return 0; } } + +namespace Test30 { + +// Test that we don't assert when generating a vtable for F. +struct A { }; + +struct B : virtual A { + int i; +}; + +struct C { + virtual void f(); +}; + +struct D : virtual C, B { }; +struct E : virtual D { }; + +struct F : E { + virtual void f(); +}; +void F::f() { } + +} |