[llvm] r174564 - Fix CMake detection of various cmath functions, and XFAIL the test on platforms that are known to be missing them.

Owen Anderson resistor at mac.com
Wed Feb 6 16:54:05 PST 2013


Author: resistor
Date: Wed Feb  6 18:54:05 2013
New Revision: 174564

URL: http://llvm.org/viewvc/llvm-project?rev=174564&view=rev
Log:
Fix CMake detection of various cmath functions, and XFAIL the test on platforms that are known to be missing them.

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

Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=174564&r1=174563&r2=174564&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Wed Feb  6 18:54:05 2013
@@ -7,6 +7,7 @@ include(CheckIncludeFile)
 include(CheckLibraryExists)
 include(CheckSymbolExists)
 include(CheckFunctionExists)
+include(CheckCXXSymbolExists)
 include(CheckCXXSourceCompiles)
 include(TestBigEndian)
 
@@ -119,12 +120,12 @@ check_symbol_exists(isnan math.h HAVE_IS
 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)

Modified: llvm/trunk/include/llvm/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.cmake?rev=174564&r1=174563&r2=174564&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.cmake (original)
+++ llvm/trunk/include/llvm/Config/config.h.cmake Wed Feb  6 18:54:05 2013
@@ -146,6 +146,24 @@
 /* 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}
 

Modified: llvm/trunk/test/Transforms/ConstProp/half.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/ConstProp/half.ll?rev=174564&r1=174563&r2=174564&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/ConstProp/half.ll (original)
+++ llvm/trunk/test/Transforms/ConstProp/half.ll Wed Feb  6 18:54:05 2013
@@ -1,4 +1,5 @@
 ; RUN: opt -constprop -S < %s | FileCheck %s
+; XFAIL: win32, freebsd
 
 ; CHECK: fabs_call
 define half @fabs_call() {





More information about the llvm-commits mailing list