[compiler-rt] [compiler-rt] Simplify and rename of operator_new_size_type (PR #83912)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 8 21:21:44 PST 2024
================
@@ -191,15 +191,10 @@ typedef uptr OFF_T;
#endif
typedef u64 OFF64_T;
-#if (SANITIZER_WORDSIZE == 64) || SANITIZER_APPLE
-typedef uptr operator_new_size_type;
+#ifdef __SIZE_TYPE__
+typedef __SIZE_TYPE__ usize;
#else
-# if defined(__s390__) && !defined(__s390x__)
-// Special case: 31-bit s390 has unsigned long as size_t.
-typedef unsigned long operator_new_size_type;
-# else
-typedef u32 operator_new_size_type;
-# endif
+typedef uptr usize;
----------------
arichardson wrote:
Looks like it's correct: https://godbolt.org/z/rjnhWeW6v
https://github.com/llvm/llvm-project/pull/83912
More information about the llvm-commits
mailing list