From e567f37dabc242cb02fb8b8b288fd05a0aebfb8f Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 13 Oct 2021 20:41:54 -0700 Subject: [clang] Use llvm::is_contained (NFC) --- clang/lib/Lex/ModuleMap.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/Lex/ModuleMap.cpp') diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 8475417..53b824b 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -989,9 +989,8 @@ Module *ModuleMap::inferFrameworkModule(const DirectoryEntry *FrameworkDir, // We're allowed to infer for this directory, but make sure it's okay // to infer this particular module. StringRef Name = llvm::sys::path::stem(FrameworkDirName); - canInfer = std::find(inferred->second.ExcludedModules.begin(), - inferred->second.ExcludedModules.end(), - Name) == inferred->second.ExcludedModules.end(); + canInfer = + !llvm::is_contained(inferred->second.ExcludedModules, Name); Attrs.IsSystem |= inferred->second.Attrs.IsSystem; Attrs.IsExternC |= inferred->second.Attrs.IsExternC; -- cgit v1.1