blob: 200f21a5da726e23f7c0d3d553be4a092418e2a2 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s
Anders Carlssonf6c56e22009-11-25 03:15:49 +00002
3struct A {
4 A();
5};
6
John McCall8e51a1f2010-02-18 21:31:48 +00007// CHECK: define void @_ZN1AC1Ev(%struct.A* %this)
Anders Carlssonf6c56e22009-11-25 03:15:49 +00008// CHECK: define void @_ZN1AC2Ev(%struct.A* %this)
9A::A() { }
10
11struct B : virtual A {
12 B();
13};
14
John McCall92ac9ff2010-02-17 03:52:49 +000015// CHECK: define void @_ZN1BC1Ev(%struct.B* %this)
John McCall8e51a1f2010-02-18 21:31:48 +000016// CHECK: define void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt)
Anders Carlssonf6c56e22009-11-25 03:15:49 +000017B::B() { }
Anders Carlssonb2bcf1c2010-02-06 02:44:09 +000018
19struct C : virtual A {
20 C(bool);
21};
22
John McCall92ac9ff2010-02-17 03:52:49 +000023// CHECK: define void @_ZN1CC1Eb(%struct.B* %this, i1 zeroext)
John McCall8e51a1f2010-02-18 21:31:48 +000024// CHECK: define void @_ZN1CC2Eb(%struct.B* %this, i8** %vtt, i1 zeroext)
Anders Carlssonb2bcf1c2010-02-06 02:44:09 +000025C::C(bool) { }