blob: 38f6a3e462330d337440ef846f2743bdd7694eb4 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
Fariborz Jahanianc93c1682011-10-21 22:27:12 +00002// rdar://10246395
3
4#define WEAK __attribute__ ((weak))
5
6class WEAK A {
7 virtual void foo();
8};
9
10class B : public A {
11 virtual void foo();
12};
13void A::foo() { }
14void B::foo() { }
15
16class T {};
17class T1 {};
18
19class C : public T1, public B, public T {
20 virtual void foo();
21};
22void C::foo() { }
23
24class V1 : public virtual A {
25 virtual void foo();
26};
27
28class V2 : public virtual V1 {
29 virtual void foo();
30};
31void V1::foo() { }
32void V2::foo() { }
33
34// CHECK: @_ZTS1A = weak_odr constant
Stephen Hines651f13c2014-04-23 16:59:28 -070035// CHECK: @_ZTI1A = weak_odr constant
Fariborz Jahanianc93c1682011-10-21 22:27:12 +000036// CHECK: @_ZTS1B = weak_odr constant
Stephen Hines651f13c2014-04-23 16:59:28 -070037// CHECK: @_ZTI1B = weak_odr constant
Fariborz Jahanianc93c1682011-10-21 22:27:12 +000038// CHECK: @_ZTS1C = weak_odr constant
39// CHECK: @_ZTS2T1 = linkonce_odr constant
Stephen Hines651f13c2014-04-23 16:59:28 -070040// CHECK: @_ZTI2T1 = linkonce_odr constant
Fariborz Jahanianc93c1682011-10-21 22:27:12 +000041// CHECK: @_ZTS1T = linkonce_odr constant
Stephen Hines651f13c2014-04-23 16:59:28 -070042// CHECK: @_ZTI1T = linkonce_odr constant
43// CHECK: @_ZTI1C = weak_odr constant
Fariborz Jahanianc93c1682011-10-21 22:27:12 +000044// CHECK: @_ZTS2V1 = weak_odr constant
Stephen Hines651f13c2014-04-23 16:59:28 -070045// CHECK: @_ZTI2V1 = weak_odr constant
Fariborz Jahanianc93c1682011-10-21 22:27:12 +000046// CHECK: @_ZTS2V2 = weak_odr constant
Stephen Hines651f13c2014-04-23 16:59:28 -070047// CHECK: @_ZTI2V2 = weak_odr constant