[lld] 407df06 - [lld] Use llvm::any_of (NFC) (#141316)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 23 23:59:48 PDT 2025


Author: Kazu Hirata
Date: 2025-05-23T23:59:45-07:00
New Revision: 407df069ec1143bcfc6b6d34502d6e60ebcafa4f

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

LOG: [lld] Use llvm::any_of (NFC) (#141316)

Added: 
    

Modified: 
    lld/MachO/DriverUtils.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/DriverUtils.cpp b/lld/MachO/DriverUtils.cpp
index cf874018fa34b..f519ee617b8f2 100644
--- a/lld/MachO/DriverUtils.cpp
+++ b/lld/MachO/DriverUtils.cpp
@@ -277,9 +277,8 @@ DylibFile *macho::loadDylib(MemoryBufferRef mbref, DylibFile *umbrella,
   }
 
   if (explicitlyLinked && !newFile->allowableClients.empty()) {
-    bool allowed = std::any_of(
-        newFile->allowableClients.begin(), newFile->allowableClients.end(),
-        [&](StringRef allowableClient) {
+    bool allowed =
+        llvm::any_of(newFile->allowableClients, [&](StringRef allowableClient) {
           // We only do a prefix match to match LD64's behaviour.
           return allowableClient.starts_with(config->clientName);
         });


        


More information about the llvm-commits mailing list