aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support/IsInf.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-25 18:47:10 +0000
committerChris Lattner <sabre@nondot.org>2004-10-25 18:47:10 +0000
commitf0ae6c62e8cd53ef8c81f87e3a7abb0d15b6775b (patch)
tree42f76cbff0a79ed920c698044a54e586988b8103 /lib/Support/IsInf.cpp
parent67b6e4e9399c9aaceceda7b6f501d25706f4dbd7 (diff)
downloadexternal_llvm-f0ae6c62e8cd53ef8c81f87e3a7abb0d15b6775b.zip
external_llvm-f0ae6c62e8cd53ef8c81f87e3a7abb0d15b6775b.tar.gz
external_llvm-f0ae6c62e8cd53ef8c81f87e3a7abb0d15b6775b.tar.bz2
Patch to support MSVC, contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/IsInf.cpp')
-rw-r--r--lib/Support/IsInf.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Support/IsInf.cpp b/lib/Support/IsInf.cpp
index c50eadf..7087dd9 100644
--- a/lib/Support/IsInf.cpp
+++ b/lib/Support/IsInf.cpp
@@ -24,6 +24,9 @@ using std::isinf;
// apparently this has been a problem with Solaris for years.
# include <ieeefp.h>
static int isinf(double x) { return !finite(x) && x==x; }
+#elif defined(_MSC_VER)
+#include <float.h>
+#define isinf(X) (!_finite(X))
#else
# error "Don't know how to get isinf()"
#endif