mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 03:36:38 +00:00
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
This commit is contained in:
parent
3d84935d28
commit
91c71ddd8d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user