aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/attributes.c
blob: 45b0cebf792b56e0a15aa294f4ea7c957b448561 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// RUN: clang -emit-llvm -o %t %s &&
// RUN: grep 't1.*noreturn' %t &&
// RUN: grep 't2.*nounwind' %t &&
// RUN: grep 'weak.*t3' %t &&
// RUN: grep 'hidden.*t4' %t &&
// RUN: grep 't5.*weak' %t &&
// RUN: grep 't6.*protected' %t &&
// RUN: grep 't7.*noreturn' %t &&
// RUN: grep 't7.*nounwind' %t &&
// RUN: grep 't9.*alias.*weak.*t8' %t

void t1() __attribute__((noreturn));
void t1() {}

void t2() __attribute__((nothrow));
void t2() {}

void t3() __attribute__((weak));
void t3() {}

void t4() __attribute__((visibility("hidden")));
void t4() {}

int t5 __attribute__((weak)) = 2;

int t6 __attribute__((visibility("protected")));

void t7() __attribute__((noreturn, nothrow));
void t7() {}

void __t8() {}
void t9() __attribute__((weak, alias("__t8")));