1 //===-- main.cpp ------------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 static int g_next_value = 12345;
16 VBase() : m_value(g_next_value++) {}
20 printf("%p: %s\n%p: m_value = 0x%8.8x\n", this, __PRETTY_FUNCTION__, &m_value, m_value);
25 class Derived1 : public virtual VBase
31 printf("%p: %s\n", this, __PRETTY_FUNCTION__);
37 class Derived2 : public virtual VBase
44 printf("%p: %s\n", this, __PRETTY_FUNCTION__);
49 class Joiner1 : public Derived1, public Derived2
57 printf("%p: %s \n%p: m_joiner1 = 0x%8.8x\n%p: m_joiner2 = 0x%8.8x\n",
71 class Joiner2 : public Derived2
76 int main(int argc, const char * argv[])
83 d = &j2; // breakpoint 1
84 return 0; // breakpoint 2