summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Option
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-08-11 22:21:41 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-08-11 22:21:41 +0000
commit0d955d0bf5cbbd50061309ad2c08c0dcf8f62039 (patch)
tree19991ceb4f16b4e3ce06fe2c39304d27a93b8b7b /llvm/lib/Option
parent332b3b22109e9c0d84456888150c0a30f378f984 (diff)
downloadbcm5719-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/Option')
-rw-r--r--llvm/lib/Option/OptTable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Option/OptTable.cpp b/llvm/lib/Option/OptTable.cpp
index 13aa9667b5c..9260d79da92 100644
--- a/llvm/lib/Option/OptTable.cpp
+++ b/llvm/lib/Option/OptTable.cpp
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Option/OptTable.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
@@ -142,8 +143,7 @@ OptTable::OptTable(ArrayRef<Info> OptionInfos, bool IgnoreCase)
StringRef Prefix = I->getKey();
for (StringRef::const_iterator C = Prefix.begin(), CE = Prefix.end();
C != CE; ++C)
- if (std::find(PrefixChars.begin(), PrefixChars.end(), *C)
- == PrefixChars.end())
+ if (!is_contained(PrefixChars, *C))
PrefixChars.push_back(*C);
}
}
OpenPOWER on IntegriCloud