[all-commits] [llvm/llvm-project] c58c82: [compiler-rt] Simplify and rename of operator_new_...

Alexander Richardson via All-commits all-commits at lists.llvm.org
Fri Mar 8 21:23:19 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c58c8278f98c189d149d5f062b8d4f56efcada90
      https://github.com/llvm/llvm-project/commit/c58c8278f98c189d149d5f062b8d4f56efcada90
  Author: Alexander Richardson <alexrichardson at google.com>
  Date:   2024-03-08 (Fri, 08 Mar 2024)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_common.h
    M compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
    M compiler-rt/lib/sanitizer_common/sanitizer_placement_new.h

  Log Message:
  -----------
  [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



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list