[lld] c04e1c8 - [lld-macho] Fix build on 32-bit systems

Jez Ng via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 3 08:12:24 PDT 2021


Author: Jez Ng
Date: 2021-04-03T11:12:11-04:00
New Revision: c04e1c8b668f4c30c4d492671fb56ecaa7776513

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

LOG: [lld-macho] Fix build on 32-bit systems

Summary: Follow-up to D99633.

Added: 
    

Modified: 
    lld/MachO/Target.h

Removed: 
    


################################################################################
diff  --git a/lld/MachO/Target.h b/lld/MachO/Target.h
index 9eed70bbee4b..ca71105d01e6 100644
--- a/lld/MachO/Target.h
+++ b/lld/MachO/Target.h
@@ -70,11 +70,11 @@ class TargetInfo {
   uint32_t cpuType;
   uint32_t cpuSubtype;
 
-  size_t pageZeroSize;
-  size_t stubSize;
-  size_t stubHelperHeaderSize;
-  size_t stubHelperEntrySize;
-  size_t wordSize;
+  uint64_t pageZeroSize;
+  uint64_t stubSize;
+  uint64_t stubHelperHeaderSize;
+  uint64_t stubHelperEntrySize;
+  uint64_t wordSize;
 };
 
 TargetInfo *createX86_64TargetInfo();
@@ -89,8 +89,8 @@ struct LP64 {
   static constexpr uint32_t magic = llvm::MachO::MH_MAGIC_64;
   static constexpr uint32_t segmentLCType = llvm::MachO::LC_SEGMENT_64;
 
-  static constexpr size_t pageZeroSize = 1ull << 32;
-  static constexpr size_t wordSize = 8;
+  static constexpr uint64_t pageZeroSize = 1ull << 32;
+  static constexpr uint64_t wordSize = 8;
 };
 
 struct ILP32 {
@@ -102,8 +102,8 @@ struct ILP32 {
   static constexpr uint32_t magic = llvm::MachO::MH_MAGIC;
   static constexpr uint32_t segmentLCType = llvm::MachO::LC_SEGMENT;
 
-  static constexpr size_t pageZeroSize = 1ull << 12;
-  static constexpr size_t wordSize = 4;
+  static constexpr uint64_t pageZeroSize = 1ull << 12;
+  static constexpr uint64_t wordSize = 4;
 };
 
 extern TargetInfo *target;


        


More information about the llvm-commits mailing list