diff options
Diffstat (limited to 'test/CodeGenCXX/vtable-layout.cpp')
-rw-r--r-- | test/CodeGenCXX/vtable-layout.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGenCXX/vtable-layout.cpp b/test/CodeGenCXX/vtable-layout.cpp new file mode 100644 index 0000000000..6bfa025bea --- /dev/null +++ b/test/CodeGenCXX/vtable-layout.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm-only -fdump-vtable-layouts 2>&1 | FileCheck %s +namespace Test1 { + +// CHECK: Vtable for 'Test1::A' (3 entries). +// CHECK-NEXT: 0 | offset_to_top (0) +// CHECK-NEXT: 1 | Test1::A RTTI +// CHECK-NEXT: 2 | Test1::A::f +struct A { + virtual void f(); +}; + +void A::f() { } + +} + |