r183308 - Add a test for the breakage from r183298
Timur Iskhodzhanov
timurrrr at google.com
Wed Jun 5 06:49:11 PDT 2013
Author: timurrrr
Date: Wed Jun 5 08:49:11 2013
New Revision: 183308
URL: http://llvm.org/viewvc/llvm-project?rev=183308&view=rev
Log:
Add a test for the breakage from r183298
Modified:
cfe/trunk/test/CodeGenCXX/vtable-layout.cpp
Modified: cfe/trunk/test/CodeGenCXX/vtable-layout.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/vtable-layout.cpp?rev=183308&r1=183307&r2=183308&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/vtable-layout.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/vtable-layout.cpp Wed Jun 5 08:49:11 2013
@@ -1889,3 +1889,37 @@ namespace Test39 {
void B::foo2() {
}
}
+
+namespace Test40 {
+ struct A {
+ virtual void foo() = 0;
+ };
+
+ struct B : public A {
+ virtual void foo();
+ };
+
+ struct C: public B {
+ // CHECK-46: VTable indices for 'Test40::C' (8 entries).
+ // CHECK-46-NEXT: 1 | int Test40::C::f(int)
+ // CHECK-46-NEXT: 2 | int Test40::C::f()
+ // CHECK-46-NEXT: 3 | int Test40::C::g(int)
+ // CHECK-46-NEXT: 4 | int Test40::C::g()
+ // CHECK-46-NEXT: 5 | int Test40::C::h(int)
+ // CHECK-46-NEXT: 6 | int Test40::C::h()
+ // CHECK-46-NEXT: 7 | int Test40::C::i(int)
+ // CHECK-46-NEXT: 8 | int Test40::C::i()
+ virtual int f(int);
+ virtual int f();
+ virtual int g(int);
+ virtual int g();
+ virtual int h(int);
+ virtual int h();
+ virtual int i(int);
+ virtual int i();
+ };
+
+ class D : C {};
+
+ D d;
+}
More information about the cfe-commits
mailing list