[compiler-rt] r239321 - [asan] Fix Android build for API >= 21.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Jun 8 11:15:52 PDT 2015
Author: eugenis
Date: Mon Jun 8 13:15:52 2015
New Revision: 239321
URL: http://llvm.org/viewvc/llvm-project?rev=239321&view=rev
Log:
[asan] Fix Android build for API >= 21.
/code/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:971:8: error: address of function 'dl_iterate_phdr' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
if (!dl_iterate_phdr)
~^~~~~~~~~~~~~~~
/code/llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:971:8: note: prefix with the address-of operator to silence this warning
if (!dl_iterate_phdr)
^
&
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=239321&r1=239320&r2=239321&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Mon Jun 8 13:15:52 2015
@@ -968,7 +968,7 @@ static int dl_iterate_phdr_test_cb(struc
static atomic_uint32_t android_api_level;
static u32 AndroidDetectApiLevel() {
- if (!dl_iterate_phdr)
+ if (!&dl_iterate_phdr)
return 19; // K or lower
bool base_name_seen = false;
dl_iterate_phdr(dl_iterate_phdr_test_cb, &base_name_seen);
More information about the llvm-commits
mailing list