2008-06-12 20:40:02 +08:00
|
|
|
// RUN: clang -emit-llvm < %s | grep 't1.*noreturn' &&
|
2008-03-03 11:28:21 +08:00
|
|
|
void t1() __attribute__((noreturn));
|
|
|
|
void t1() {}
|
|
|
|
|
2008-06-12 20:40:02 +08:00
|
|
|
// RUN: clang -emit-llvm < %s | grep 't2.*nounwind' &&
|
2008-03-03 11:28:21 +08:00
|
|
|
void t2() __attribute__((nothrow));
|
|
|
|
void t2() {}
|
|
|
|
|
2008-06-12 20:40:02 +08:00
|
|
|
// RUN: clang -emit-llvm < %s | grep 'weak.*t3' &&
|
2008-03-03 11:28:21 +08:00
|
|
|
void t3() __attribute__((weak));
|
|
|
|
void t3() {}
|
|
|
|
|
2008-06-12 20:40:02 +08:00
|
|
|
// RUN: clang -emit-llvm < %s | grep 'hidden.*t4' &&
|
2008-03-05 02:08:48 +08:00
|
|
|
void t4() __attribute__((visibility("hidden")));
|
2008-03-03 11:28:21 +08:00
|
|
|
void t4() {}
|
|
|
|
|
2008-06-12 20:40:02 +08:00
|
|
|
// RUN: clang -emit-llvm < %s | grep 't5.*weak' &&
|
2008-03-03 11:28:21 +08:00
|
|
|
int t5 __attribute__((weak)) = 2;
|
|
|
|
|
2008-06-12 20:40:02 +08:00
|
|
|
// RUN: clang -emit-llvm < %s | grep 't6.*protected' &&
|
2008-03-05 02:08:48 +08:00
|
|
|
int t6 __attribute__((visibility("protected")));
|
2008-03-03 11:45:26 +08:00
|
|
|
|
2008-06-12 20:40:02 +08:00
|
|
|
// RUN: clang -emit-llvm < %s | grep 't7.*noreturn' &&
|
|
|
|
// RUN: clang -emit-llvm < %s | grep 't7.*nounwind' &&
|
2008-03-03 11:45:26 +08:00
|
|
|
void t7() __attribute__((noreturn, nothrow));
|
|
|
|
void t7() {}
|
2008-06-08 23:45:52 +08:00
|
|
|
|
|
|
|
// RUN: clang -emit-llvm < %s | grep 't9.*alias.*weak.*t8'
|
|
|
|
void __t8() {}
|
|
|
|
void t9() __attribute__((weak, alias("__t8")));
|