[libcxx] r257422 - Put the definition of _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK in the right place.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 11 16:38:04 PST 2016
Author: marshall
Date: Mon Jan 11 18:38:04 2016
New Revision: 257422
URL: http://llvm.org/viewvc/llvm-project?rev=257422&view=rev
Log:
Put the definition of _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK in the right place.
Modified:
libcxx/trunk/include/__config
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=257422&r1=257421&r2=257422&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Mon Jan 11 18:38:04 2016
@@ -433,6 +433,11 @@ namespace std {
#define _LIBCPP_HAS_NO_ASAN
#endif
+// Allow for build-time disabling of unsigned integer sanitization
+#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute((no_sanitize("unsigned-integer-overflow")))
+#endif
+
#elif defined(__GNUC__)
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
@@ -597,11 +602,6 @@ namespace std {
#define _LIBCPP_HAS_NO_ASAN
-// Allow for build-time disabling of unsigned integer sanitization
-#ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
-#define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute((no_sanitize("unsigned integer")))
-#endif
-
#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__
#ifndef _LIBCPP_HAS_NO_NOEXCEPT
More information about the cfe-commits
mailing list