summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/vtable-layout.cpp
blob: beb82ef90548f87e102148baf15e67ece9fdc9e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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:       -- (Test1::A, 0) vtable address --
// CHECK-NEXT:   2 | Test1::A::f
struct A {
  virtual void f();
};

void A::f() { }

}

OpenPOWER on IntegriCloud