[compiler-rt] r333109 - [sanitizer] Define UINTPTR_MAX
Kostya Kortchinsky via llvm-commits
llvm-commits at lists.llvm.org
Wed May 23 11:13:21 PDT 2018
Author: cryptoad
Date: Wed May 23 11:13:21 2018
New Revision: 333109
URL: http://llvm.org/viewvc/llvm-project?rev=333109&view=rev
Log:
[sanitizer] Define UINTPTR_MAX
Summary:
`sanitizer_internal_defs.h` didn't have this define, which will be useful in
an upcoming CL.
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: kubamracek, delcypher, llvm-commits, #sanitizers
Differential Revision: https://reviews.llvm.org/D47270
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h?rev=333109&r1=333108&r2=333109&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_internal_defs.h Wed May 23 11:13:21 2018
@@ -352,6 +352,12 @@ void NORETURN CheckFailed(const char *fi
#define INT64_MAX (__INT64_C(9223372036854775807))
#undef UINT64_MAX
#define UINT64_MAX (__UINT64_C(18446744073709551615))
+#undef UINTPTR_MAX
+#if SANITIZER_WORDSIZE == 64
+# define UINTPTR_MAX (18446744073709551615UL)
+#else
+# define UINTPTR_MAX (4294967295U)
+#endif // SANITIZER_WORDSIZE == 64
enum LinkerInitialized { LINKER_INITIALIZED = 0 };
More information about the llvm-commits
mailing list