Patch to support MSVC, contributed by Morten Ofstad
authorChris Lattner <sabre@nondot.org>
Mon, 25 Oct 2004 18:47:10 +0000 (18:47 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 25 Oct 2004 18:47:10 +0000 (18:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17220 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/IsInf.cpp

index c50eadff1796982452b10f62c2df427d91e3e7d2..7087dd94c1421a617ef47b24cf95a4b7ecec9e9d 100644 (file)
@@ -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