aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/attributes.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-03-03 03:28:21 +0000
committerChris Lattner <sabre@nondot.org>2008-03-03 03:28:21 +0000
commitddee4231e9bdfbac1e1f5385ff1a17fd0e0b0e39 (patch)
tree266719d65eb29ebb29f33ad8e7a25043b99396f2 /test/CodeGen/attributes.c
parentdcaa0962401a59c5888a12f6e00e27f5e1d29c5b (diff)
Add a bunch of attributes, patch by Nuno Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/attributes.c')
-rw-r--r--test/CodeGen/attributes.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/attributes.c b/test/CodeGen/attributes.c
new file mode 100644
index 0000000000..59f3e73297
--- /dev/null
+++ b/test/CodeGen/attributes.c
@@ -0,0 +1,21 @@
+// RUN: clang -emit-llvm < %s | grep 't1.*noreturn'
+void t1() __attribute__((noreturn));
+void t1() {}
+
+// RUN: clang -emit-llvm < %s | grep 't2.*nounwind'
+void t2() __attribute__((nothrow));
+void t2() {}
+
+// RUN: clang -emit-llvm < %s | grep 'weak.*t3'
+void t3() __attribute__((weak));
+void t3() {}
+
+// RUN: clang -emit-llvm < %s | grep 'hidden.*t4'
+void t4() __attribute__((visibility(hidden)));
+void t4() {}
+
+// RUN: clang -emit-llvm < %s | grep 't5.*weak'
+int t5 __attribute__((weak)) = 2;
+
+// RUN: clang -emit-llvm < %s | grep 't6.*protected'
+int t6 __attribute__((visibility(protected)));