blob: 45b0cebf792b56e0a15aa294f4ea7c957b448561 [file] [log] [blame]
Daniel Dunbard58139e2008-09-27 00:39:13 +00001// RUN: clang -emit-llvm -o %t %s &&
2// RUN: grep 't1.*noreturn' %t &&
3// RUN: grep 't2.*nounwind' %t &&
4// RUN: grep 'weak.*t3' %t &&
5// RUN: grep 'hidden.*t4' %t &&
6// RUN: grep 't5.*weak' %t &&
7// RUN: grep 't6.*protected' %t &&
8// RUN: grep 't7.*noreturn' %t &&
9// RUN: grep 't7.*nounwind' %t &&
10// RUN: grep 't9.*alias.*weak.*t8' %t
11
Chris Lattnerddee4232008-03-03 03:28:21 +000012void t1() __attribute__((noreturn));
13void t1() {}
14
Chris Lattnerddee4232008-03-03 03:28:21 +000015void t2() __attribute__((nothrow));
16void t2() {}
17
Chris Lattnerddee4232008-03-03 03:28:21 +000018void t3() __attribute__((weak));
19void t3() {}
20
Chris Lattner7b937ae2008-03-04 18:08:48 +000021void t4() __attribute__((visibility("hidden")));
Chris Lattnerddee4232008-03-03 03:28:21 +000022void t4() {}
23
Chris Lattnerddee4232008-03-03 03:28:21 +000024int t5 __attribute__((weak)) = 2;
25
Chris Lattner7b937ae2008-03-04 18:08:48 +000026int t6 __attribute__((visibility("protected")));
Chris Lattnerf89e88d2008-03-03 03:45:26 +000027
Chris Lattnerf89e88d2008-03-03 03:45:26 +000028void t7() __attribute__((noreturn, nothrow));
29void t7() {}
Nuno Lopesd4cbda62008-06-08 15:45:52 +000030
Nuno Lopesd4cbda62008-06-08 15:45:52 +000031void __t8() {}
32void t9() __attribute__((weak, alias("__t8")));