1 // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
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 };
foo()13 void A::foo() { }
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 };
foo()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 };
foo()31 void V1::foo() { }
foo()32 void V2::foo() { }
33 
34 // CHECK: @_ZTS1A = weak_odr constant
35 // CHECK: @_ZTI1A = weak_odr constant
36 // CHECK: @_ZTS1B = weak_odr constant
37 // CHECK: @_ZTI1B = weak_odr constant
38 // CHECK: @_ZTS1C = weak_odr constant
39 // CHECK: @_ZTS2T1 = linkonce_odr constant
40 // CHECK: @_ZTI2T1 = linkonce_odr constant
41 // CHECK: @_ZTS1T = linkonce_odr constant
42 // CHECK: @_ZTI1T = linkonce_odr constant
43 // CHECK: @_ZTI1C = weak_odr constant
44 // CHECK: @_ZTS2V1 = weak_odr constant
45 // CHECK: @_ZTI2V1 = weak_odr constant
46 // CHECK: @_ZTS2V2 = weak_odr constant
47 // CHECK: @_ZTI2V2 = weak_odr constant
48