diff options
| author | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-06-23 12:45:54 +0000 |
|---|---|---|
| committer | Dylan Noblesmith <nobled@dreamwidth.org> | 2011-06-23 12:45:54 +0000 |
| commit | 5417eed2014a2fb46057bdd9931e878968b810dc (patch) | |
| tree | 60ed5762e4de9e4d7eb29c201d6fd3ab8e138735 /include/llvm | |
| parent | 4e5885dc0f6aa0d5e095d79996955042d7b82b8d (diff) | |
| download | external_llvm-5417eed2014a2fb46057bdd9931e878968b810dc.zip external_llvm-5417eed2014a2fb46057bdd9931e878968b810dc.tar.gz external_llvm-5417eed2014a2fb46057bdd9931e878968b810dc.tar.bz2 | |
Support: make floating-exception header private
It has only one user. This eliminates the last include of
config.h from the public headers -- ideally, config.h
shouldn't even be installed by `make install` anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
| -rw-r--r-- | include/llvm/Support/FEnv.h | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/include/llvm/Support/FEnv.h b/include/llvm/Support/FEnv.h deleted file mode 100644 index f6f4333..0000000 --- a/include/llvm/Support/FEnv.h +++ /dev/null @@ -1,56 +0,0 @@ -//===- llvm/Support/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 |
