Skip to content

[compiler-rt] Simplify definition of uptr #106155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,19 @@
// in a portable way by the language itself.
namespace __sanitizer {

#if defined(_WIN64)
#if defined(__UINTPTR_TYPE__)
typedef __UINTPTR_TYPE__ uptr;
typedef __INTPTR_TYPE__ sptr;
#elif defined(_WIN64)
// 64-bit Windows uses LLP64 data model.
typedef unsigned long long uptr;
typedef signed long long sptr;
#else
# if (SANITIZER_WORDSIZE == 64) || SANITIZER_APPLE
typedef unsigned long uptr;
typedef signed long sptr;
# else
#elif defined(_WIN32)
typedef unsigned int uptr;
typedef signed int sptr;
# endif
#endif // defined(_WIN64)
#else
# error Unsupported compiler, missing __UINTPTR_TYPE__
#endif // defined(__UINTPTR_TYPE__)
#if defined(__x86_64__)
// Since x32 uses ILP32 data model in 64-bit hardware mode, we must use
// 64-bit pointer to unwind stack frame.
Expand Down
Loading