Fix CMake detection of various cmath functions, and XFAIL the test on platforms that...
authorOwen Anderson <resistor@mac.com>
Thu, 7 Feb 2013 00:54:05 +0000 (00:54 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 7 Feb 2013 00:54:05 +0000 (00:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174564 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/config-ix.cmake
include/llvm/Config/config.h.cmake
test/Transforms/ConstProp/half.ll

index f077ecaf579fcc8c9e3fa2cd1c9ec9851b14b789..b83c1c67b2444be86d5049e6744ff81f15b9cc5a 100755 (executable)
@@ -7,6 +7,7 @@ include(CheckIncludeFile)
 include(CheckLibraryExists)
 include(CheckSymbolExists)
 include(CheckFunctionExists)
 include(CheckLibraryExists)
 include(CheckSymbolExists)
 include(CheckFunctionExists)
+include(CheckCXXSymbolExists)
 include(CheckCXXSourceCompiles)
 include(TestBigEndian)
 
 include(CheckCXXSourceCompiles)
 include(TestBigEndian)
 
@@ -119,12 +120,12 @@ check_symbol_exists(isnan math.h HAVE_ISNAN_IN_MATH_H)
 check_symbol_exists(ceilf math.h HAVE_CEILF)
 check_symbol_exists(floorf math.h HAVE_FLOORF)
 check_symbol_exists(fmodf math.h HAVE_FMODF)
 check_symbol_exists(ceilf math.h HAVE_CEILF)
 check_symbol_exists(floorf math.h HAVE_FLOORF)
 check_symbol_exists(fmodf math.h HAVE_FMODF)
-check_symbol_exists(log "math.h cmath" HAVE_LOG)
-check_symbol_exists(log2 "math.h cmath" HAVE_LOG2)
-check_symbol_exists(log10 "math.h cmath" HAVE_LOG10)
-check_symbol_exists(exp "math.h cmath" HAVE_EXP)
-check_symbol_exists(exp2 "math.h cmath" HAVE_EXP2)
-check_symbol_exists(exp10 "math.h cmath" HAVE_EXP10)
+check_cxx_symbol_exists(log cmath HAVE_LOG)
+check_cxx_symbol_exists(log2 cmath HAVE_LOG2)
+check_cxx_symbol_exists(log10 cmath HAVE_LOG10)
+check_cxx_symbol_exists(exp cmath HAVE_EXP)
+check_cxx_symbol_exists(exp2 cmath HAVE_EXP2)
+check_cxx_symbol_exists(exp10 cmath HAVE_EXP10)
 if( HAVE_SETJMP_H )
   check_symbol_exists(longjmp setjmp.h HAVE_LONGJMP)
   check_symbol_exists(setjmp setjmp.h HAVE_SETJMP)
 if( HAVE_SETJMP_H )
   check_symbol_exists(longjmp setjmp.h HAVE_LONGJMP)
   check_symbol_exists(setjmp setjmp.h HAVE_SETJMP)
index 948708343136c5973db2fe768d5de3a34ecb70f8..0a2685739782be7ecdf38be8adf9bac177d3234e 100644 (file)
 /* Define to 1 if you have the `floorf' function. */
 #cmakedefine HAVE_FLOORF ${HAVE_FLOORF}
 
 /* Define to 1 if you have the `floorf' function. */
 #cmakedefine HAVE_FLOORF ${HAVE_FLOORF}
 
+/* Define to 1 if you have the `log' function. */
+#cmakedefine HAVE_LOG ${HAVE_LOG}
+
+/* Define to 1 if you have the `log2' function. */
+#cmakedefine HAVE_LOG2 ${HAVE_LOG2}
+
+/* Define to 1 if you have the `log10' function. */
+#cmakedefine HAVE_LOG10 ${HAVE_LOG10}
+
+/* Define to 1 if you have the `exp' function. */
+#cmakedefine HAVE_EXP ${HAVE_LOG}
+
+/* Define to 1 if you have the `exp2' function. */
+#cmakedefine HAVE_EXP2 ${HAVE_LOG2}
+
+/* Define to 1 if you have the `exp10' function. */
+#cmakedefine HAVE_EXP10 ${HAVE_LOG10}
+
 /* Define to 1 if you have the `fmodf' function. */
 #cmakedefine HAVE_FMODF ${HAVE_FMODF}
 
 /* Define to 1 if you have the `fmodf' function. */
 #cmakedefine HAVE_FMODF ${HAVE_FMODF}
 
index 3d246d887262d3b3d0a121e6fe6d62db0fb3c917..b9d2aeb71698607bf536df78d24b70af12b0ca83 100644 (file)
@@ -1,4 +1,5 @@
 ; RUN: opt -constprop -S < %s | FileCheck %s
 ; RUN: opt -constprop -S < %s | FileCheck %s
+; XFAIL: win32, freebsd
 
 ; CHECK: fabs_call
 define half @fabs_call() {
 
 ; CHECK: fabs_call
 define half @fabs_call() {