Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s |
Fariborz Jahanian | c93c168 | 2011-10-21 22:27:12 +0000 | [diff] [blame] | 2 | // rdar://10246395 |
| 3 | |
| 4 | #define WEAK __attribute__ ((weak)) |
| 5 | |
| 6 | class WEAK A { |
| 7 | virtual void foo(); |
| 8 | }; |
| 9 | |
| 10 | class B : public A { |
| 11 | virtual void foo(); |
| 12 | }; |
| 13 | void A::foo() { } |
| 14 | void B::foo() { } |
| 15 | |
| 16 | class T {}; |
| 17 | class T1 {}; |
| 18 | |
| 19 | class C : public T1, public B, public T { |
| 20 | virtual void foo(); |
| 21 | }; |
| 22 | void C::foo() { } |
| 23 | |
| 24 | class V1 : public virtual A { |
| 25 | virtual void foo(); |
| 26 | }; |
| 27 | |
| 28 | class V2 : public virtual V1 { |
| 29 | virtual void foo(); |
| 30 | }; |
| 31 | void V1::foo() { } |
| 32 | void V2::foo() { } |
| 33 | |
| 34 | // CHECK: @_ZTS1A = weak_odr constant |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 35 | // CHECK: @_ZTI1A = weak_odr constant |
Fariborz Jahanian | c93c168 | 2011-10-21 22:27:12 +0000 | [diff] [blame] | 36 | // CHECK: @_ZTS1B = weak_odr constant |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 37 | // CHECK: @_ZTI1B = weak_odr constant |
Fariborz Jahanian | c93c168 | 2011-10-21 22:27:12 +0000 | [diff] [blame] | 38 | // CHECK: @_ZTS1C = weak_odr constant |
| 39 | // CHECK: @_ZTS2T1 = linkonce_odr constant |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 40 | // CHECK: @_ZTI2T1 = linkonce_odr constant |
Fariborz Jahanian | c93c168 | 2011-10-21 22:27:12 +0000 | [diff] [blame] | 41 | // CHECK: @_ZTS1T = linkonce_odr constant |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 42 | // CHECK: @_ZTI1T = linkonce_odr constant |
| 43 | // CHECK: @_ZTI1C = weak_odr constant |
Fariborz Jahanian | c93c168 | 2011-10-21 22:27:12 +0000 | [diff] [blame] | 44 | // CHECK: @_ZTS2V1 = weak_odr constant |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 45 | // CHECK: @_ZTI2V1 = weak_odr constant |
Fariborz Jahanian | c93c168 | 2011-10-21 22:27:12 +0000 | [diff] [blame] | 46 | // CHECK: @_ZTS2V2 = weak_odr constant |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 47 | // CHECK: @_ZTI2V2 = weak_odr constant |