Quick hack to get this file compiling again on Mac OS X. The right thing to do
authorBrian Gaeke <gaeke@uiuc.edu>
Mon, 14 Jun 2004 06:33:19 +0000 (06:33 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Mon, 14 Jun 2004 06:33:19 +0000 (06:33 +0000)
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

lib/Transforms/Utils/Local.cpp

index edb9742655a7343834e593890953398a58617635..e9ec6db069c14800ce30eb803376f47b576cfd87 100644 (file)
 #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...
 //