summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-01-22 13:39:59 +0100
committerSergei Golubchik <serg@mariadb.org>2018-01-22 16:36:39 +0100
commit8539e4b1b609f8060677fcb3e27b6b6224d582d6 (patch)
treee7e284b8efe58ea162d7d43dadb8774503ab212b
parentb20c3dc664314a3045fa31e2245d4613e9efa508 (diff)
downloadmariadb-git-8539e4b1b609f8060677fcb3e27b6b6224d582d6.tar.gz
improve ASAN instrumentation: clang
translate clang __has_feature to gcc macros
-rw-r--r--include/my_valgrind.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/my_valgrind.h b/include/my_valgrind.h
index 9baed2e01d6..b76f5607bb5 100644
--- a/include/my_valgrind.h
+++ b/include/my_valgrind.h
@@ -13,6 +13,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+/* clang -> gcc */
+#ifndef __has_feature
+# define __has_feature(x) 0
+#endif
+#if __has_feature(address_sanitizer)
+# define __SANITIZE_ADDRESS__ 1
+#endif
+
#ifdef HAVE_valgrind
#define IF_VALGRIND(A,B) A
#else