From d3642d720ce0149b158046bd79677e536d9c0f31 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 25 Oct 2004 18:47:10 +0000 Subject: Patch to support MSVC, contributed by Morten Ofstad llvm-svn: 17220 --- llvm/lib/Support/IsInf.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/Support/IsInf.cpp') diff --git a/llvm/lib/Support/IsInf.cpp b/llvm/lib/Support/IsInf.cpp index c50eadff179..7087dd94c14 100644 --- a/llvm/lib/Support/IsInf.cpp +++ b/llvm/lib/Support/IsInf.cpp @@ -24,6 +24,9 @@ using std::isinf; // apparently this has been a problem with Solaris for years. # include static int isinf(double x) { return !finite(x) && x==x; } +#elif defined(_MSC_VER) +#include +#define isinf(X) (!_finite(X)) #else # error "Don't know how to get isinf()" #endif -- cgit v1.2.3