1 // RUN: %clang_cc1 -emit-llvm -triple x86_64 -Werror %s -o - | FileCheck %s
3 // CHECK: @llvm.used = appending global [7 x ptr]
4 // CHECK-SAME: @_ZN2X0C2Ev
5 // CHECK-SAME: @_ZN2X0C1Ev
6 // CHECK-SAME: @_ZN2X0D2Ev
7 // CHECK-SAME: @_ZN2X0D1Ev
8 // CHECK-SAME: @_ZN2X16Nested2f1Ev
9 // CHECK-SAME: @_ZN10merge_declL4funcEv
10 // CHECK-SAME: @_ZN18instantiate_member1SIiE1fEv
13 // CHECK: define linkonce_odr{{.*}} @_ZN2X0C1Ev({{.*}}
14 __attribute__((used
, retain
)) X0() {}
15 // CHECK: define linkonce_odr{{.*}} @_ZN2X0D1Ev({{.*}}
16 __attribute__((used
, retain
)) ~X0() {}
22 // CHECK: define linkonce_odr{{.*}} @_ZN2X16Nested2f1Ev({{.*}}
23 void __attribute__((retain
)) f0() {}
24 void __attribute__((used
, retain
)) f1() {}
28 // CHECK: define internal void @_ZN10merge_declL4funcEv(){{.*}}
29 namespace merge_decl
{
31 void bar() { void func() __attribute__((used
, retain
)); }
33 } // namespace merge_decl
35 namespace instantiate_member
{
38 void __attribute__((used
, retain
)) f() {}
42 // CHECK: define linkonce_odr{{.*}} void @_ZN18instantiate_member1SIiE1fEv({{.*}}
45 } // namespace instantiate_member