[llvm-commits] [llvm] r133713 - in /llvm/trunk: include/llvm/Support/FEnv.h lib/Analysis/ConstantFolding.cpp lib/Analysis/FEnv.h

Dylan Noblesmith nobled at dreamwidth.org
Thu Jun 23 05:45:54 PDT 2011


Author: nobled
Date: Thu Jun 23 07:45:54 2011
New Revision: 133713

URL: http://llvm.org/viewvc/llvm-project?rev=133713&view=rev
Log:
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.


Added:
    llvm/trunk/lib/Analysis/FEnv.h
      - copied, changed from r133709, llvm/trunk/include/llvm/Support/FEnv.h
Removed:
    llvm/trunk/include/llvm/Support/FEnv.h
Modified:
    llvm/trunk/lib/Analysis/ConstantFolding.cpp

Removed: llvm/trunk/include/llvm/Support/FEnv.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FEnv.h?rev=133712&view=auto
==============================================================================
--- llvm/trunk/include/llvm/Support/FEnv.h (original)
+++ llvm/trunk/include/llvm/Support/FEnv.h (removed)
@@ -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

Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=133713&r1=133712&r2=133713&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original)
+++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Thu Jun 23 07:45:54 2011
@@ -31,9 +31,10 @@
 #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;
 
 //===----------------------------------------------------------------------===//

Copied: llvm/trunk/lib/Analysis/FEnv.h (from r133709, llvm/trunk/include/llvm/Support/FEnv.h)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/FEnv.h?p2=llvm/trunk/lib/Analysis/FEnv.h&p1=llvm/trunk/include/llvm/Support/FEnv.h&r1=133709&r2=133713&rev=133713&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FEnv.h (original)
+++ llvm/trunk/lib/Analysis/FEnv.h Thu Jun 23 07:45:54 2011
@@ -1,4 +1,4 @@
-//===- llvm/Support/FEnv.h - Host floating-point exceptions ------*- C++ -*-===//
+//===- FEnv.h - Host floating-point exceptions ------------------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //





More information about the llvm-commits mailing list