virtual-bases.cpp revision 8e51a1f5da6ef4a1a168d14116c6eed3a578a263
1// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s
2
3struct A {
4  A();
5};
6
7// CHECK: define void @_ZN1AC1Ev(%struct.A* %this)
8// CHECK: define void @_ZN1AC2Ev(%struct.A* %this)
9A::A() { }
10
11struct B : virtual A {
12  B();
13};
14
15// CHECK: define void @_ZN1BC1Ev(%struct.B* %this)
16// CHECK: define void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt)
17B::B() { }
18
19struct C : virtual A {
20  C(bool);
21};
22
23// CHECK: define void @_ZN1CC1Eb(%struct.B* %this, i1 zeroext)
24// CHECK: define void @_ZN1CC2Eb(%struct.B* %this, i8** %vtt, i1 zeroext)
25C::C(bool) { }
26