[llvm-commits] CVS: llvm/lib/Support/IsInf.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Oct 25 11:47:21 PDT 2004



Changes in directory llvm/lib/Support:

IsInf.cpp updated: 1.3 -> 1.4
---
Log message:

Patch to support MSVC, contributed by Morten Ofstad


---
Diffs of the changes:  (+3 -0)

Index: llvm/lib/Support/IsInf.cpp
diff -u llvm/lib/Support/IsInf.cpp:1.3 llvm/lib/Support/IsInf.cpp:1.4
--- llvm/lib/Support/IsInf.cpp:1.3	Wed Sep  1 17:55:35 2004
+++ llvm/lib/Support/IsInf.cpp	Mon Oct 25 13:47:10 2004
@@ -24,6 +24,9 @@
 // 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






More information about the llvm-commits mailing list