summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/vtable-layout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGenCXX/vtable-layout.cpp')
-rw-r--r--clang/test/CodeGenCXX/vtable-layout.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/vtable-layout.cpp b/clang/test/CodeGenCXX/vtable-layout.cpp
index c59eff0abf8..3f7e18a0955 100644
--- a/clang/test/CodeGenCXX/vtable-layout.cpp
+++ b/clang/test/CodeGenCXX/vtable-layout.cpp
@@ -39,4 +39,22 @@ struct A {
void A::f() { }
+// Another simple vtable dumper test.
+// CHECK: Vtable for 'Test2::B' (6 entries).
+// CHECK-NEXT: 0 | offset_to_top (0)
+// CHECK-NEXT: 1 | Test2::B RTTI
+// CHECK-NEXT: -- (Test2::B, 0) vtable address --
+// CHECK-NEXT: 2 | void Test2::B::f()
+// CHECK-NEXT: 3 | void Test2::B::g() [pure]
+// CHECK-NEXT: 4 | Test2::B::~B() [complete] [pure]
+// CHECK-NEXT: 5 | Test2::B::~B() [deleting] [pure]
+
+struct B {
+ virtual void f();
+ virtual void g() = 0;
+ virtual ~B() = 0;
+};
+
+void B::f() { }
+
}
OpenPOWER on IntegriCloud