diff options
author | Kazu Hirata <kazu@google.com> | 2020-12-10 20:40:37 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2020-12-10 20:40:37 -0800 |
commit | ef1cf345bbc56501f775330ec4a010d22443f6b7 (patch) | |
tree | f84f90299ab77bde6a6c98366629e5b2f3cc81b8 /llvm/lib/Support/CommandLine.cpp | |
parent | bc633fe46bbec1cf70d4a3f740da43888979d8c6 (diff) | |
download | llvm-ef1cf345bbc56501f775330ec4a010d22443f6b7.zip llvm-ef1cf345bbc56501f775330ec4a010d22443f6b7.tar.gz llvm-ef1cf345bbc56501f775330ec4a010d22443f6b7.tar.bz2 |
[Support] Use is_contained (NFC)
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index a185863..1b9436d 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -464,7 +464,7 @@ void Option::addCategory(OptionCategory &C) { // must be explicitly added if you want multiple categories that include it. if (&C != &GeneralCategory && Categories[0] == &GeneralCategory) Categories[0] = &C; - else if (find(Categories, &C) == Categories.end()) + else if (!is_contained(Categories, &C)) Categories.push_back(&C); } @@ -2590,7 +2590,7 @@ void cl::HideUnrelatedOptions(ArrayRef<const cl::OptionCategory *> Categories, SubCommand &Sub) { for (auto &I : Sub.OptionsMap) { for (auto &Cat : I.second->Categories) { - if (find(Categories, Cat) == Categories.end() && Cat != &GenericCategory) + if (!is_contained(Categories, Cat) && Cat != &GenericCategory) I.second->setHiddenFlag(cl::ReallyHidden); } } |