diff options
author | Kazu Hirata <kazu@google.com> | 2021-10-24 09:32:57 -0700 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-10-24 09:32:57 -0700 |
commit | 7cc8fa2dd2d8167d427cadb4fc6f4254b53a8359 (patch) | |
tree | fcfea3df3966f2d228feddd1a954235fd64ef112 /clang/lib/Lex/ModuleMap.cpp | |
parent | f5f592683f82a78ca53f999716f476f8030863e0 (diff) | |
download | llvm-7cc8fa2dd2d8167d427cadb4fc6f4254b53a8359.zip llvm-7cc8fa2dd2d8167d427cadb4fc6f4254b53a8359.tar.gz llvm-7cc8fa2dd2d8167d427cadb4fc6f4254b53a8359.tar.bz2 |
Use llvm::is_contained (NFC)
Diffstat (limited to 'clang/lib/Lex/ModuleMap.cpp')
-rw-r--r-- | clang/lib/Lex/ModuleMap.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Lex/ModuleMap.cpp b/clang/lib/Lex/ModuleMap.cpp index 08381d0..6324cdc 100644 --- a/clang/lib/Lex/ModuleMap.cpp +++ b/clang/lib/Lex/ModuleMap.cpp @@ -1217,9 +1217,8 @@ void ModuleMap::addHeader(Module *Mod, Module::Header Header, // FIXME: Should we diagnose if a header is listed twice in the // same module definition? auto &HeaderList = Headers[Header.Entry]; - for (auto H : HeaderList) - if (H == KH) - return; + if (llvm::is_contained(HeaderList, KH)) + return; HeaderList.push_back(KH); Mod->Headers[headerRoleToKind(Role)].push_back(Header); |