aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJyotsna Verma <jverma@codeaurora.org>2013-04-16 16:10:38 +0000
committerJyotsna Verma <jverma@codeaurora.org>2013-04-16 16:10:38 +0000
commit7a92c8957df49250fbc6e02e76b18aac8ae1ecf1 (patch)
tree35666a087b9f8210f81d83d4684188a2760693ce /test
parentb004a8e5aa700108de2acc8f81b0dd2ec7518899 (diff)
downloadclang-7a92c8957df49250fbc6e02e76b18aac8ae1ecf1.tar.gz
Remove setjmp.h header file from Sema/return.c test and include necessary
declarations explicitly in the test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Sema/return.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/Sema/return.c b/test/Sema/return.c
index ddd99a3272..7e7c8b7b84 100644
--- a/test/Sema/return.c
+++ b/test/Sema/return.c
@@ -197,9 +197,14 @@ int test29() {
exit(1);
}
-#ifndef __hexagon__
-#include <setjmp.h>
+// Include these declarations here explicitly so we don't depend on system headers.
+typedef struct __jmp_buf_tag{} jmp_buf[1];
+
+extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((noreturn));
+extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __attribute__ ((noreturn));
+
jmp_buf test30_j;
+
int test30() {
if (j)
longjmp(test30_j, 1);
@@ -210,7 +215,6 @@ int test30() {
_longjmp(test30_j, 1);
#endif
}
-#endif
typedef void test31_t(int status);
void test31(test31_t *callback __attribute__((noreturn)));