[sanitizer] Define 32bit uptr as uint

This makes it consistent with uintptr_t.

It's 45138f788c with Darwin fix.

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D108163
This commit is contained in:
Vitaly Buka
2021-08-14 16:51:10 -07:00
parent 3a05af12b3
commit 7256c05ecb
2 changed files with 6 additions and 1 deletions

View File

@@ -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

View File

@@ -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");