diff options
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Support/YAMLParser.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 1b468a0aa9a..102bc909889 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -2101,7 +2101,7 @@ void cl::AddExtraVersionPrinter(void (*func)()) { StringMap<Option *> &cl::getRegisteredOptions(SubCommand &Sub) { auto &Subs = GlobalParser->RegisteredSubCommands; (void)Subs; - assert(std::find(Subs.begin(), Subs.end(), &Sub) != Subs.end()); + assert(is_contained(Subs, &Sub)); return Sub.OptionsMap; } diff --git a/llvm/lib/Support/YAMLParser.cpp b/llvm/lib/Support/YAMLParser.cpp index 620841c2d15..2b71c596cc4 100644 --- a/llvm/lib/Support/YAMLParser.cpp +++ b/llvm/lib/Support/YAMLParser.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/YAMLParser.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" @@ -802,8 +803,7 @@ Token &Scanner::peekNext() { removeStaleSimpleKeyCandidates(); SimpleKey SK; SK.Tok = TokenQueue.begin(); - if (std::find(SimpleKeys.begin(), SimpleKeys.end(), SK) - == SimpleKeys.end()) + if (!is_contained(SimpleKeys, SK)) break; else NeedMore = true; |