1 // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s 2 3 #pragma GCC visibility push(hidden) 4 int x = 2; 5 // CHECK: @x = hidden global 6 7 extern int y; 8 #pragma GCC visibility pop 9 int y = 4; 10 // CHECK: @y = hidden global 11 12 #pragma GCC visibility push(hidden) 13 extern __attribute((visibility("default"))) int z; 14 int z = 0; 15 // CHECK: @z = global 16 #pragma GCC visibility pop 17 18 #pragma GCC visibility push(hidden) f()19void f() {} 20 // CHECK-LABEL: define hidden void @f 21 22 __attribute((visibility("default"))) void g(); g()23void g() {} 24 // CHECK-LABEL: define void @g 25