r179604 - Remove setjmp.h header file from Sema/return.c test and include necessary
Jyotsna Verma
jverma at codeaurora.org
Tue Apr 16 09:10:39 PDT 2013
Author: jverma
Date: Tue Apr 16 11:10:38 2013
New Revision: 179604
URL: http://llvm.org/viewvc/llvm-project?rev=179604&view=rev
Log:
Remove setjmp.h header file from Sema/return.c test and include necessary
declarations explicitly in the test.
Modified:
cfe/trunk/test/Sema/return.c
Modified: cfe/trunk/test/Sema/return.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/return.c?rev=179604&r1=179603&r2=179604&view=diff
==============================================================================
--- cfe/trunk/test/Sema/return.c (original)
+++ cfe/trunk/test/Sema/return.c Tue Apr 16 11:10:38 2013
@@ -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)));
More information about the cfe-commits
mailing list