summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-07-08 18:34:46 +0000
committerNico Weber <nicolasweber@gmx.de>2014-07-08 18:34:46 +0000
commita62cffae523b91937759ca8c01a52b60fef60cb8 (patch)
treea89f720bc4644473e435e932d2a77925169bdd41
parent1287091373e524414a4b47919eb862500ef8f6f3 (diff)
downloadbcm5719-llvm-a62cffae523b91937759ca8c01a52b60fef60cb8.tar.gz
bcm5719-llvm-a62cffae523b91937759ca8c01a52b60fef60cb8.zip
Don't pull in setjmp.h in -ffreestanding compiles.
Also provide _setjmpex(). r200243 put in _setjmp() and _setjmpex() behind a comment since jmp_buf wasn't available. r200344 added jmp_buf and put in _setjmp(), but missed _setjmpex(). llvm-svn: 212557
-rw-r--r--clang/lib/Headers/Intrin.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/clang/lib/Headers/Intrin.h b/clang/lib/Headers/Intrin.h
index d8dc0a4831c..13e105ec178 100644
--- a/clang/lib/Headers/Intrin.h
+++ b/clang/lib/Headers/Intrin.h
@@ -35,7 +35,9 @@
#endif
/* For the definition of jmp_buf. */
+#if __STDC_HOSTED__
#include <setjmp.h>
+#endif
#ifdef __cplusplus
extern "C" {
@@ -291,7 +293,9 @@ unsigned __int64 __cdecl _rotr64(unsigned __int64 _Value, int _Shift);
static __inline__
unsigned char _rotr8(unsigned char _Value, unsigned char _Shift);
int _sarx_i32(int, unsigned int);
+#if __STDC_HOSTED__
int __cdecl _setjmp(jmp_buf);
+#endif
unsigned int _shlx_u32(unsigned int, unsigned int);
unsigned int _shrx_u32(unsigned int, unsigned int);
void _Store_HLERelease(long volatile *, long);
@@ -449,8 +453,9 @@ unsigned int __cdecl _readgsbase_u32(void);
unsigned __int64 __cdecl _readgsbase_u64(void);
unsigned __int64 _rorx_u64(unsigned __int64, const unsigned int);
__int64 _sarx_i64(__int64, unsigned int);
-/* FIXME: Need definition for jmp_buf.
- int __cdecl _setjmpex(jmp_buf); */
+#if __STDC_HOSTED__
+int __cdecl _setjmpex(jmp_buf);
+#endif
unsigned __int64 _shlx_u64(unsigned __int64, unsigned int);
unsigned __int64 shrx_u64(unsigned __int64, unsigned int);
unsigned __int64 _tzcnt_u64(unsigned __int64);
OpenPOWER on IntegriCloud