[PATCH] Remove log2 dependency when building against Android API-9 SDK

Vince Harron vince at nethacker.com
Sun May 24 06:28:33 PDT 2015


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9884

Files:
  llvm/trunk/include/llvm/Support/MathExtras.h

Index: llvm/trunk/include/llvm/Support/MathExtras.h
===================================================================
--- llvm/trunk/include/llvm/Support/MathExtras.h
+++ llvm/trunk/include/llvm/Support/MathExtras.h
@@ -456,7 +456,7 @@
 /// Log2 - This function returns the log base 2 of the specified value
 inline double Log2(double Value) {
 #if defined(__ANDROID_API__) && __ANDROID_API__ < 18
-  return (double)__builtin_log2l(Value);
+  return __builtin_log(Value) / __builtin_log(2.0);
 #else
   return log2(Value);
 #endif

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9884.26380.patch
Type: text/x-patch
Size: 533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150524/91119ec9/attachment.bin>


More information about the llvm-commits mailing list