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
This commit is contained in:
Nico Weber 2014-07-08 18:34:46 +00:00
parent 1287091373
commit a62cffae52
1 changed files with 7 additions and 2 deletions

View File

@ -35,7 +35,9 @@
#endif #endif
/* For the definition of jmp_buf. */ /* For the definition of jmp_buf. */
#if __STDC_HOSTED__
#include <setjmp.h> #include <setjmp.h>
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -291,7 +293,9 @@ unsigned __int64 __cdecl _rotr64(unsigned __int64 _Value, int _Shift);
static __inline__ static __inline__
unsigned char _rotr8(unsigned char _Value, unsigned char _Shift); unsigned char _rotr8(unsigned char _Value, unsigned char _Shift);
int _sarx_i32(int, unsigned int); int _sarx_i32(int, unsigned int);
#if __STDC_HOSTED__
int __cdecl _setjmp(jmp_buf); int __cdecl _setjmp(jmp_buf);
#endif
unsigned int _shlx_u32(unsigned int, unsigned int); unsigned int _shlx_u32(unsigned int, unsigned int);
unsigned int _shrx_u32(unsigned int, unsigned int); unsigned int _shrx_u32(unsigned int, unsigned int);
void _Store_HLERelease(long volatile *, long); void _Store_HLERelease(long volatile *, long);
@ -449,8 +453,9 @@ unsigned int __cdecl _readgsbase_u32(void);
unsigned __int64 __cdecl _readgsbase_u64(void); unsigned __int64 __cdecl _readgsbase_u64(void);
unsigned __int64 _rorx_u64(unsigned __int64, const unsigned int); unsigned __int64 _rorx_u64(unsigned __int64, const unsigned int);
__int64 _sarx_i64(__int64, unsigned int); __int64 _sarx_i64(__int64, unsigned int);
/* FIXME: Need definition for jmp_buf. #if __STDC_HOSTED__
int __cdecl _setjmpex(jmp_buf); */ int __cdecl _setjmpex(jmp_buf);
#endif
unsigned __int64 _shlx_u64(unsigned __int64, unsigned int); unsigned __int64 _shlx_u64(unsigned __int64, unsigned int);
unsigned __int64 shrx_u64(unsigned __int64, unsigned int); unsigned __int64 shrx_u64(unsigned __int64, unsigned int);
unsigned __int64 _tzcnt_u64(unsigned __int64); unsigned __int64 _tzcnt_u64(unsigned __int64);