1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fvisibility-inlines-hidden -fvisibility-inlines-hidden-static-local-var %s -emit-llvm -o - | FileCheck %s
3 #define used __attribute__((used))
5 used
inline void f1() {
6 // CHECK: @_ZZ2f1vE6f1_var = linkonce_odr hidden global i32 0
10 __attribute__((visibility("default")))
11 used
inline void f2() {
12 // CHECK: @_ZZ2f2vE6f2_var = linkonce_odr global i32 0
13 static int f2_var
= 0;
18 // CHECK: @_ZZN1S2f3EvE6f3_var = linkonce_odr hidden global i32 0
19 static int f3_var
= 0;
27 // CHECK: @_ZZ2f4vE6f4_var = internal global i32 0
28 static int f4_var
= 0;
31 __attribute__((visibility("default")))
33 // CHECK: @_ZZ2f5vE6f5_var = internal global i32 0
34 static int f5_var
= 0;
38 // CHECK: @_ZZN1S2f6EvE6f6_var = internal global i32 0
39 static int f6_var
= 0;
42 used
inline void S::f7() {
43 // CHECK: @_ZZN1S2f7EvE6f7_var = linkonce_odr hidden global i32 0
44 static int f7_var
= 0;
48 struct __attribute__((visibility("default"))) S2
{
50 // CHECK: @_ZZN2S22f8EvE6f8_var = linkonce_odr hidden global i32 0
51 static int f8_var
= 0;