Unverified Commit c58c8278 authored by Alexander Richardson's avatar Alexander Richardson Committed by GitHub
Browse files

[compiler-rt] Simplify and rename of operator_new_size_type

We can rely on the compiler-provided macro __SIZE_TYPE__ for all
non-MSVC compilers and fall back to `uptr` otherwise.
I verified via https://godbolt.org/z/MW9KMjv5f that this works for MSVC
as well as GCC 4.5 Clang 3.0, so that should cover supported compilers.

While touching this also rename operator_new_size_type to usize which
makes it more obvious that this is the equivalent to size_t within
the sanitizers runtime (which I plan to use in follow-up changes).

Reviewed By: vitalybuka

Pull Request: https://github.com/llvm/llvm-project/pull/83912
parent 0b9ce71a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment