aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/ModuleMap.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2021-10-13 20:41:54 -0700
committerKazu Hirata <kazu@google.com>2021-10-13 20:41:55 -0700
commite567f37dabc242cb02fb8b8b288fd05a0aebfb8f (patch)
treec71c133e4f4548a1e17437740f2432f245676791 /clang/lib/Lex/ModuleMap.cpp
parentb3c9d84e5a8ef49e33b20e1ea9608c5c9b935591 (diff)
downloadllvm-e567f37dabc242cb02fb8b8b288fd05a0aebfb8f.zip
llvm-e567f37dabc242cb02fb8b8b288fd05a0aebfb8f.tar.gz
llvm-e567f37dabc242cb02fb8b8b288fd05a0aebfb8f.tar.bz2
[clang] Use llvm::is_contained (NFC)
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r--clang/lib/Lex/ModuleMap.cpp5
1 files changed, 2 insertions, 3 deletions
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;