blob: 3533d6d84324a04e8f9d7ab81d7423b2c4cf1859 [file] [log] [blame]
Chris Lattnerddee4232008-03-03 03:28:21 +00001// RUN: clang -emit-llvm < %s | grep 't1.*noreturn'
2void t1() __attribute__((noreturn));
3void t1() {}
4
5// RUN: clang -emit-llvm < %s | grep 't2.*nounwind'
6void t2() __attribute__((nothrow));
7void t2() {}
8
9// RUN: clang -emit-llvm < %s | grep 'weak.*t3'
10void t3() __attribute__((weak));
11void t3() {}
12
13// RUN: clang -emit-llvm < %s | grep 'hidden.*t4'
14void t4() __attribute__((visibility(hidden)));
15void t4() {}
16
17// RUN: clang -emit-llvm < %s | grep 't5.*weak'
18int t5 __attribute__((weak)) = 2;
19
20// RUN: clang -emit-llvm < %s | grep 't6.*protected'
21int t6 __attribute__((visibility(protected)));
Chris Lattnerf89e88d2008-03-03 03:45:26 +000022
23// RUN: clang -emit-llvm < %s | grep 't7.*noreturn'
Gabor Greif15f36222008-03-03 14:53:09 +000024// RUN: clang -emit-llvm < %s | grep 't7.*nounwind'
Chris Lattnerf89e88d2008-03-03 03:45:26 +000025void t7() __attribute__((noreturn, nothrow));
26void t7() {}