diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-18 17:28:16 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-18 17:28:16 +0000 |
commit | 54d9a78b2ca41b89f5dc8ec6688086db59667495 (patch) | |
tree | c900dcf4bda209d73c806ef5c98509b18f2d25e7 | |
parent | eb577d0df44df4df974e9b3a538575d92358a3b3 (diff) |
Add another class from cxx-vtable-ex.html
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96588 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGenCXX/vtable-layout-abi-examples.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/test/CodeGenCXX/vtable-layout-abi-examples.cpp b/test/CodeGenCXX/vtable-layout-abi-examples.cpp index 52c8bc6d8f..5dabe29a21 100644 --- a/test/CodeGenCXX/vtable-layout-abi-examples.cpp +++ b/test/CodeGenCXX/vtable-layout-abi-examples.cpp @@ -46,5 +46,29 @@ struct B: public virtual A { int ib; }; void B::f() {} - + +// CHECK: Vtable for 'Test1::C' (13 entries). +// CHECK-NEXT: 0 | vbase_offset (16) +// CHECK-NEXT: 1 | offset_to_top (0) +// CHECK-NEXT: 2 | Test1::C RTTI +// CHECK-NEXT: -- (Test1::C, 0) vtable address -- +// CHECK-NEXT: 3 | void Test1::C::g() +// CHECK-NEXT: 4 | void Test1::C::h() +// CHECK-NEXT: 5 | vcall_offset (-16) +// CHECK-NEXT: 6 | vcall_offset (-16) +// CHECK-NEXT: 7 | vcall_offset (0) +// CHECK-NEXT: 8 | offset_to_top (-16) +// CHECK-NEXT: 9 | Test1::C RTTI +// CHECK-NEXT: -- (Test1::A, 16) vtable address -- +// CHECK-NEXT: 10 | void Test1::A::f() +// CHECK-NEXT: 11 | void Test1::C::g() +// CHECK-NEXT: [this adjustment: 0 non-virtual, -32 vcall offset offset] +// CHECK-NEXT: 12 | void Test1::C::h() +// CHECK-NEXT: [this adjustment: 0 non-virtual, -40 vcall offset offset] +struct C: public virtual A { + void g (); + void h (); + int ic; +}; +void C::g() {} } |