[llvm-commits] CVS: llvm/lib/Transforms/Utils/Local.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Mon Jun 14 01:40:02 PDT 2004
Changes in directory llvm/lib/Transforms/Utils:
Local.cpp updated: 1.26 -> 1.27
---
Log message:
Quick hack to get this file compiling again on Mac OS X. The right thing to do
is write an autoconf macro that checks whether __isnan or isnan actually works
**using the C++ compiler after #include <cmath>**, instead of doing it the easy
way with AC_CHECK_FUNCS().
---
Diffs of the changes: (+8 -0)
Index: llvm/lib/Transforms/Utils/Local.cpp
diff -u llvm/lib/Transforms/Utils/Local.cpp:1.26 llvm/lib/Transforms/Utils/Local.cpp:1.27
--- llvm/lib/Transforms/Utils/Local.cpp:1.26 Sat Jun 12 20:23:56 2004
+++ llvm/lib/Transforms/Utils/Local.cpp Mon Jun 14 01:33:19 2004
@@ -20,6 +20,14 @@
#include <cmath>
using namespace llvm;
+#if defined(__POWERPC__) && defined(__APPLE_CC__)
+// FIXME: Currently it seems that isnan didn't make its way into the Apple
+// C++ headers, although it IS in the C headers (which confuses autoconf
+// in a big way). This is a quick fix to get things compiling, until one of
+// us has time to write a more complicated autoconf test.
+extern "C" int isnan (double d);
+#endif
+
//===----------------------------------------------------------------------===//
// Local constant propagation...
//
More information about the llvm-commits
mailing list