blob: a310a3ab6441dcc21b6725b9fdec257eb0f03101 [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'
Chris Lattner7b937ae2008-03-04 18:08:48 +000014void t4() __attribute__((visibility("hidden")));
Chris Lattnerddee4232008-03-03 03:28:21 +000015void 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'
Chris Lattner7b937ae2008-03-04 18:08:48 +000021int 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() {}