diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2014-04-14 15:44:57 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2014-04-14 15:44:57 +0000 |
commit | 91c71ddd8dfef9f1d26df1bc6441771b0542bb00 (patch) | |
tree | 3b7a192e7b2c7a3a454589a66570eb90631f1791 /libcxx/include/__config | |
parent | 3d84935d28480bd41378634cdd8d0f7da00a4978 (diff) | |
download | bcm5719-llvm-91c71ddd8dfef9f1d26df1bc6441771b0542bb00.tar.gz bcm5719-llvm-91c71ddd8dfef9f1d26df1bc6441771b0542bb00.zip |
Define a new macro in libc++ named '_LIBCPP_HAS_NO_ASAN'. When this is defined,
libc++ will not call address_sanitizer to detect addressing errors in the
standard library containers. This is a negative macro to enable users to
disable the libc++ checks even if they are compiling with address sanitizer
enabled by defining this macro.
At the present time, there is no code in libc++ that looks at this macro.
That will come soon. This is just infrastructure.
llvm-svn: 206184
Diffstat (limited to 'libcxx/include/__config')
-rw-r--r-- | libcxx/include/__config | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 33254e98456..fb775c6bdf5 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -352,6 +352,10 @@ namespace std { } } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -426,6 +430,10 @@ namespace _LIBCPP_NAMESPACE { using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(_LIBCPP_MSVC) #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES @@ -451,6 +459,8 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); namespace std { } +#define _LIBCPP_HAS_NO_ASAN + #elif defined(__IBMCPP__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -483,6 +493,8 @@ namespace std { } } +#define _LIBCPP_HAS_NO_ASAN + #endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS |