Remove old fenv.h workaround for a historic clang driver bug
Tested and works fine with clang using libstdc++. All indications are that this was fixed some time ago and isn't a problem with any clang version we support. I've added a note in PR6907 which is still open for some reason. llvm-svn: 210485
This commit is contained in:
parent
cd95922bd1
commit
51420a8d62
|
@ -39,13 +39,6 @@
|
||||||
|
|
||||||
#ifdef HAVE_FENV_H
|
#ifdef HAVE_FENV_H
|
||||||
#include <fenv.h>
|
#include <fenv.h>
|
||||||
#define USE_FENV
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// FIXME: Clang's #include handling apparently doesn't work for libstdc++'s
|
|
||||||
// fenv.h; see PR6907 for details.
|
|
||||||
#if defined(__clang__) && defined(_GLIBCXX_FENV_H)
|
|
||||||
#undef USE_FENV
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
@ -1329,7 +1322,7 @@ static Constant *GetConstantFoldFPValue(double V, Type *Ty) {
|
||||||
namespace {
|
namespace {
|
||||||
/// llvm_fenv_clearexcept - Clear the floating-point exception state.
|
/// llvm_fenv_clearexcept - Clear the floating-point exception state.
|
||||||
static inline void llvm_fenv_clearexcept() {
|
static inline void llvm_fenv_clearexcept() {
|
||||||
#if defined(USE_FENV) && HAVE_DECL_FE_ALL_EXCEPT
|
#if defined(HAVE_FENV_H) && HAVE_DECL_FE_ALL_EXCEPT
|
||||||
feclearexcept(FE_ALL_EXCEPT);
|
feclearexcept(FE_ALL_EXCEPT);
|
||||||
#endif
|
#endif
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
@ -1340,7 +1333,7 @@ static inline bool llvm_fenv_testexcept() {
|
||||||
int errno_val = errno;
|
int errno_val = errno;
|
||||||
if (errno_val == ERANGE || errno_val == EDOM)
|
if (errno_val == ERANGE || errno_val == EDOM)
|
||||||
return true;
|
return true;
|
||||||
#if defined(USE_FENV) && HAVE_DECL_FE_ALL_EXCEPT && HAVE_DECL_FE_INEXACT
|
#if defined(HAVE_FENV_H) && HAVE_DECL_FE_ALL_EXCEPT && HAVE_DECL_FE_INEXACT
|
||||||
if (fetestexcept(FE_ALL_EXCEPT & ~FE_INEXACT))
|
if (fetestexcept(FE_ALL_EXCEPT & ~FE_INEXACT))
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue