[llvm-branch-commits] [llvm] 0799233 - [llvm-cov] Use is_contained (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Dec 27 10:04:48 PST 2020


Author: Kazu Hirata
Date: 2020-12-27T09:57:25-08:00
New Revision: 079923309c6e8ef054555f015a49f41f46b41b2e

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

LOG: [llvm-cov] Use is_contained (NFC)

Added: 
    

Modified: 
    llvm/tools/llvm-size/llvm-size.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-size/llvm-size.cpp b/llvm/tools/llvm-size/llvm-size.cpp
index 987270e98c48..4f98a4c0ec10 100644
--- a/llvm/tools/llvm-size/llvm-size.cpp
+++ b/llvm/tools/llvm-size/llvm-size.cpp
@@ -542,9 +542,7 @@ static bool checkMachOAndArchFlags(ObjectFile *O, StringRef Filename) {
     H = MachO->MachOObjectFile::getHeader();
     T = MachOObjectFile::getArchTriple(H.cputype, H.cpusubtype);
   }
-  if (none_of(ArchFlags, [&](const std::string &Name) {
-        return Name == T.getArchName();
-      })) {
+  if (!is_contained(ArchFlags, T.getArchName())) {
     error("no architecture specified", Filename);
     return false;
   }


        


More information about the llvm-branch-commits mailing list