summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-10 21:18:39 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-10 21:18:39 +0000
commit39c226fdba889c61cfc82b7a34a25c813226c2c4 (patch)
tree97dd43304323b7a20b90fddf8bdce22d730231ac /llvm/lib/Support/CommandLine.cpp
parent9e3ee13a1cc91152ae0c6880f1f2866c50275a10 (diff)
downloadbcm5719-llvm-39c226fdba889c61cfc82b7a34a25c813226c2c4.tar.gz
bcm5719-llvm-39c226fdba889c61cfc82b7a34a25c813226c2c4.zip
[STLExtras] Introduce and use llvm::count_if; NFC
(This is split out from was D21115) llvm-svn: 272435
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index aed42b25e64..9be0daada50 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -194,11 +194,10 @@ public:
void printOptionValues();
void registerCategory(OptionCategory *cat) {
- assert(std::count_if(RegisteredOptionCategories.begin(),
- RegisteredOptionCategories.end(),
- [cat](const OptionCategory *Category) {
- return cat->getName() == Category->getName();
- }) == 0 &&
+ assert(count_if(RegisteredOptionCategories,
+ [cat](const OptionCategory *Category) {
+ return cat->getName() == Category->getName();
+ }) == 0 &&
"Duplicate option categories");
RegisteredOptionCategories.insert(cat);
OpenPOWER on IntegriCloud