[lld] b3b6f7c - [MachO] using std::size_t to fix build errors on arm-ubuntu

Peter Rong via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 14:31:51 PDT 2024


Author: Peter Rong
Date: 2024-08-07T14:31:40-07:00
New Revision: b3b6f7cb0b31468078368f77118ab267b43d8628

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

LOG: [MachO] using std::size_t to fix build errors on arm-ubuntu

Fix build failure introduced by commit 6a3604ef8592edf39fedd6af8100aefafd6d931d

Signed-off-by: Peter Rong <PeterRong at meta.com>

Added: 
    

Modified: 
    lld/MachO/Driver.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index e5cba4dadc246..6a1ff96ed6569 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -1042,12 +1042,12 @@ static bool shouldAdhocSignByDefault(Architecture arch, PlatformType platform) {
          platform == PLATFORM_XROS_SIMULATOR;
 }
 
-template <unsigned long N>
+template <std::size_t N>
 using MinVersions = std::array<std::pair<PlatformType, VersionTuple>, N>;
 
 /// Returns true if the platform is greater than the min version.
 /// Returns false if the platform does not exist.
-template <unsigned long N>
+template <std::size_t N>
 static bool greaterEqMinVersion(const MinVersions<N> &minVersions,
                                 bool ignoreSimulator) {
   PlatformType platform = config->platformInfo.target.Platform;


        


More information about the llvm-commits mailing list