summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-06-23 14:19:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-06-23 14:19:39 +0000
commit83471853b1d5a9efe6b9e7565c457fc901f84926 (patch)
tree39038198377b4af7f9e86f3ea5b89f8eaefb8aa4 /lib/Analysis
parent385f46146ca2209c0ebc1df07d97f35367c20f85 (diff)
downloadllvm-83471853b1d5a9efe6b9e7565c457fc901f84926.tar.gz
llvm-83471853b1d5a9efe6b9e7565c457fc901f84926.tar.bz2
llvm-83471853b1d5a9efe6b9e7565c457fc901f84926.tar.xz
Revert "revert 133714"
This reverts commit e8e00f5efb4a22238f2407bf813de4606f30c5aa. The cmake build on OS X is still broken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/ConstantFolding.cpp3
-rw-r--r--lib/Analysis/FEnv.h56
2 files changed, 1 insertions, 58 deletions
diff --git a/lib/Analysis/ConstantFolding.cpp b/lib/Analysis/ConstantFolding.cpp
index b64f3b90e0..b5fafd685c 100644
--- a/lib/Analysis/ConstantFolding.cpp
+++ b/lib/Analysis/ConstantFolding.cpp
@@ -31,10 +31,9 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
#include "llvm/Support/MathExtras.h"
+#include "llvm/Support/FEnv.h"
#include <cerrno>
#include <cmath>
-
-#include "FEnv.h"
using namespace llvm;
//===----------------------------------------------------------------------===//
diff --git a/lib/Analysis/FEnv.h b/lib/Analysis/FEnv.h
deleted file mode 100644
index c2968fd6a3..0000000000
--- a/lib/Analysis/FEnv.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//===- FEnv.h - Host floating-point exceptions ------------------*- C++ -*-===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file provides an operating system independent interface to
-// floating-point exception interfaces.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_SYSTEM_FENV_H
-#define LLVM_SYSTEM_FENV_H
-
-#include "llvm/Config/config.h"
-#include <cerrno>
-#ifdef HAVE_FENV_H
-#include <fenv.h>
-#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 HAVE_FENV_H
-#endif
-
-namespace llvm {
-namespace sys {
-
-/// llvm_fenv_clearexcept - Clear the floating-point exception state.
-static inline void llvm_fenv_clearexcept() {
-#ifdef HAVE_FENV_H
- feclearexcept(FE_ALL_EXCEPT);
-#endif
- errno = 0;
-}
-
-/// llvm_fenv_testexcept - Test if a floating-point exception was raised.
-static inline bool llvm_fenv_testexcept() {
- int errno_val = errno;
- if (errno_val == ERANGE || errno_val == EDOM)
- return true;
-#ifdef HAVE_FENV_H
- if (fetestexcept(FE_ALL_EXCEPT & ~FE_INEXACT))
- return true;
-#endif
- return false;
-}
-
-} // End sys namespace
-} // End llvm namespace
-
-#endif