blob: a7fceb3d1ac19e2e4f3105f43c425ff62f23743a [file] [log] [blame]
Nuno Lopes060ddb02012-05-09 21:21:49 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
Eli Friedman62e22ee2010-08-05 07:00:53 +00002
3#pragma GCC visibility push(hidden)
4int x = 2;
5// CHECK: @x = hidden global
6
7extern int y;
8#pragma GCC visibility pop
9int y = 4;
10// CHECK: @y = hidden global
11
12#pragma GCC visibility push(hidden)
13extern __attribute((visibility("default"))) int z;
14int z = 0;
15// CHECK: @z = global
16#pragma GCC visibility pop
17
18#pragma GCC visibility push(hidden)
19void f() {}
20// CHECK: define hidden void @f
21
22__attribute((visibility("default"))) void g();
23void g() {}
24// CHECK: define void @g