Skip to content

Commit

Permalink
[sanitizer] Define 32bit uptr as uint
Browse files Browse the repository at this point in the history
This makes it consistent with uintptr_t.

It's 45138f7 with Darwin fix.

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D108163
  • Loading branch information
vitalybuka committed Aug 16, 2021
1 parent 3a05af1 commit 7256c05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
Expand Up @@ -139,8 +139,13 @@ namespace __sanitizer {
typedef unsigned long long uptr;
typedef signed long long sptr;
#else
# if (SANITIZER_WORDSIZE == 64) || SANITIZER_MAC
typedef unsigned long uptr;
typedef signed long sptr;
# else
typedef unsigned int uptr;
typedef signed int sptr;
# endif
#endif // defined(_WIN64)
#if defined(__x86_64__)
// Since x32 uses ILP32 data model in 64-bit hardware mode, we must use
Expand Down
Expand Up @@ -71,7 +71,7 @@ void Print(const set<uptr> &s) {
#if defined(_WIN64)
fprintf(stderr, "%llu ", *it);
#else
fprintf(stderr, "%lu ", *it);
fprintf(stderr, "%zu ", *it);
#endif
}
fprintf(stderr, "\n");
Expand Down

0 comments on commit 7256c05

Please sign in to comment.