Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin10 | FileCheck %s |
Anders Carlsson | f6c56e2 | 2009-11-25 03:15:49 +0000 | [diff] [blame] | 2 | |
| 3 | struct A { |
| 4 | A(); |
| 5 | }; |
| 6 | |
John McCall | 8e51a1f | 2010-02-18 21:31:48 +0000 | [diff] [blame^] | 7 | // CHECK: define void @_ZN1AC1Ev(%struct.A* %this) |
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) { } |