[clang] c5935af - [Toolchains] Use llvm::is_contained (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 18 15:57:55 PDT 2022


Author: Kazu Hirata
Date: 2022-06-18T15:57:50-07:00
New Revision: c5935af0583b6988a8e4f9fdcab1f4d29f04a021

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

LOG: [Toolchains] Use llvm::is_contained (NFC)

Added: 
    

Modified: 
    clang/lib/Driver/ToolChains/Clang.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 43373083f8aa..8d3584ff0ba1 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -5843,7 +5843,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
       "standalone", "objc", "swift", "swift-5.0", "swift-4.2", "swift-4.1",
     };
 
-    if (find(kCFABIs, StringRef(A->getValue())) == std::end(kCFABIs))
+    if (!llvm::is_contained(kCFABIs, StringRef(A->getValue())))
       D.Diag(diag::err_drv_invalid_cf_runtime_abi) << A->getValue();
     else
       A->render(Args, CmdArgs);


        


More information about the cfe-commits mailing list