aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-09-02 21:17:18 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-01-07 23:04:38 +0000
commit0e1e0ce556810ad5f9d45485e686f0653530516c (patch)
treeab02ce7c4fafc0518430e9cec77d41201bce23f0 /contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
parentc3eb0b7c19221f3a2133ab14d3ffffa61ec0c4bc (diff)
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Support/CommandLine.cpp')
-rw-r--r--contrib/llvm-project/llvm/lib/Support/CommandLine.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp b/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
index 66632504d6fb..d3efb8b67be5 100644
--- a/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
+++ b/contrib/llvm-project/llvm/lib/Support/CommandLine.cpp
@@ -208,8 +208,7 @@ public:
bool HadErrors = false;
if (O->hasArgStr()) {
// If it's a DefaultOption, check to make sure it isn't already there.
- if (O->isDefaultOption() &&
- SC->OptionsMap.find(O->ArgStr) != SC->OptionsMap.end())
+ if (O->isDefaultOption() && SC->OptionsMap.contains(O->ArgStr))
return;
// Add argument to the argument map!
@@ -2758,7 +2757,7 @@ StringMap<Option *> &cl::getRegisteredOptions(SubCommand &Sub) {
initCommonOptions();
auto &Subs = GlobalParser->RegisteredSubCommands;
(void)Subs;
- assert(is_contained(Subs, &Sub));
+ assert(Subs.contains(&Sub));
return Sub.OptionsMap;
}