John McCall | d46f985 | 2010-02-19 01:32:20 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 -mconstructor-aliases | FileCheck %s |
Anders Carlsson | f6c56e2 | 2009-11-25 03:15:49 +0000 | [diff] [blame] | 2 | |
| 3 | struct A { |
| 4 | A(); |
| 5 | }; |
| 6 | |
John McCall | d46f985 | 2010-02-19 01:32:20 +0000 | [diff] [blame] | 7 | // CHECK: @_ZN1AC1Ev = alias {{.*}} @_ZN1AC2Ev |
Anders Carlsson | f6c56e2 | 2009-11-25 03:15:49 +0000 | [diff] [blame] | 8 | // CHECK: define void @_ZN1AC2Ev(%struct.A* %this) |
| 9 | A::A() { } |
| 10 | |
| 11 | struct B : virtual A { |
| 12 | B(); |
| 13 | }; |
| 14 | |
John McCall | 92ac9ff | 2010-02-17 03:52:49 +0000 | [diff] [blame] | 15 | // CHECK: define void @_ZN1BC1Ev(%struct.B* %this) |
John McCall | 8e51a1f | 2010-02-18 21:31:48 +0000 | [diff] [blame] | 16 | // CHECK: define void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt) |
Anders Carlsson | f6c56e2 | 2009-11-25 03:15:49 +0000 | [diff] [blame] | 17 | B::B() { } |
Anders Carlsson | b2bcf1c | 2010-02-06 02:44:09 +0000 | [diff] [blame] | 18 | |
| 19 | struct C : virtual A { |
| 20 | C(bool); |
| 21 | }; |
| 22 | |
John McCall | 92ac9ff | 2010-02-17 03:52:49 +0000 | [diff] [blame] | 23 | // CHECK: define void @_ZN1CC1Eb(%struct.B* %this, i1 zeroext) |
John McCall | 8e51a1f | 2010-02-18 21:31:48 +0000 | [diff] [blame] | 24 | // CHECK: define void @_ZN1CC2Eb(%struct.B* %this, i8** %vtt, i1 zeroext) |
Anders Carlsson | b2bcf1c | 2010-02-06 02:44:09 +0000 | [diff] [blame] | 25 | C::C(bool) { } |