diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-11 22:21:41 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-11 22:21:41 +0000 |
commit | 0d955d0bf5cbbd50061309ad2c08c0dcf8f62039 (patch) | |
tree | 19991ceb4f16b4e3ce06fe2c39304d27a93b8b7b /llvm/lib/Support/CommandLine.cpp | |
parent | 332b3b22109e9c0d84456888150c0a30f378f984 (diff) | |
download | bcm5719-llvm-0d955d0bf5cbbd50061309ad2c08c0dcf8f62039.tar.gz bcm5719-llvm-0d955d0bf5cbbd50061309ad2c08c0dcf8f62039.zip |
Use the range variant of find instead of unpacking begin/end
If the result of the find is only used to compare against end(), just
use is_contained instead.
No functionality change is intended.
llvm-svn: 278433
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 2 |
1 files changed, 1 insertions, 1 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; } |