[compiler-rt] ef82a53 - [scudo] Change Classes definition to uptr.

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 21:12:08 PDT 2023


Author: Christopher Ferris
Date: 2023-08-15T21:11:55-07:00
New Revision: ef82a53bbb89e831bb524d1b8a60458abb86ce99

URL: https://github.com/llvm/llvm-project/commit/ef82a53bbb89e831bb524d1b8a60458abb86ce99
DIFF: https://github.com/llvm/llvm-project/commit/ef82a53bbb89e831bb524d1b8a60458abb86ce99.diff

LOG: [scudo] Change Classes definition to uptr.

All of the places that use the Classes array, use it as a uptr.
So change the array to be uptr instead of u32.

Reviewed By: Chia-hungDuan

Differential Revision: https://reviews.llvm.org/D158048

Added: 
    

Modified: 
    compiler-rt/lib/scudo/standalone/size_class_map.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/scudo/standalone/size_class_map.h b/compiler-rt/lib/scudo/standalone/size_class_map.h
index 2a6e298f936661..ebce720fe9f52c 100644
--- a/compiler-rt/lib/scudo/standalone/size_class_map.h
+++ b/compiler-rt/lib/scudo/standalone/size_class_map.h
@@ -254,7 +254,7 @@ struct AndroidSizeClassConfig {
   static const u16 MaxNumCachedHint = 13;
   static const uptr MaxBytesCachedLog = 13;
 
-  static constexpr u32 Classes[] = {
+  static constexpr uptr Classes[] = {
       0x00020, 0x00030, 0x00040, 0x00050, 0x00060, 0x00070, 0x00090, 0x000b0,
       0x000c0, 0x000e0, 0x00120, 0x00160, 0x001c0, 0x00250, 0x00320, 0x00450,
       0x00670, 0x00830, 0x00a10, 0x00c30, 0x01010, 0x01210, 0x01bd0, 0x02210,
@@ -269,7 +269,7 @@ struct AndroidSizeClassConfig {
   static const u16 MaxNumCachedHint = 14;
   static const uptr MaxBytesCachedLog = 13;
 
-  static constexpr u32 Classes[] = {
+  static constexpr uptr Classes[] = {
       0x00020, 0x00030, 0x00040, 0x00050, 0x00060, 0x00070, 0x00080, 0x00090,
       0x000a0, 0x000b0, 0x000c0, 0x000e0, 0x000f0, 0x00110, 0x00120, 0x00130,
       0x00150, 0x00160, 0x00170, 0x00190, 0x001d0, 0x00210, 0x00240, 0x002a0,


        


More information about the llvm-commits mailing list