[PATCH] D47270: [sanitizer] Define UINTPTR_MAX

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 11:17:20 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT333109: [sanitizer] Define UINTPTR_MAX (authored by cryptoad, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D47270?vs=148249&id=148256#toc

Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D47270

Files:
  lib/sanitizer_common/sanitizer_internal_defs.h


Index: lib/sanitizer_common/sanitizer_internal_defs.h
===================================================================
--- lib/sanitizer_common/sanitizer_internal_defs.h
+++ lib/sanitizer_common/sanitizer_internal_defs.h
@@ -352,6 +352,12 @@
 #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 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47270.148256.patch
Type: text/x-patch
Size: 649 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180523/7aa02cd7/attachment.bin>


More information about the llvm-commits mailing list