summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-06-14 06:33:19 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-06-14 06:33:19 +0000
commitfda2cce3bf04b530d87b551cf37a80f82074893d (patch)
treeddc8b4853be96c8274a4859fd2f6d098be9008dd /lib/Transforms/Utils/Local.cpp
parentf3210d2c53cc3211f60c83a3acbf58bec862c0fa (diff)
downloadllvm-fda2cce3bf04b530d87b551cf37a80f82074893d.tar.gz
llvm-fda2cce3bf04b530d87b551cf37a80f82074893d.tar.bz2
llvm-fda2cce3bf04b530d87b551cf37a80f82074893d.tar.xz
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(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r--lib/Transforms/Utils/Local.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index edb9742655..e9ec6db069 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -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...
//