diff options
author | Kazu Hirata <kazu@google.com> | 2021-01-01 12:44:54 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-01-01 12:44:54 -0800 |
commit | bea8d021a32d871f43909f892c8069137fb34bfa (patch) | |
tree | 72d9041063a5bbd1103d8ebf638773be99aed0ab /llvm/lib/Support/CommandLine.cpp | |
parent | f43daf1b62af25d066893af02b4f67b9b8dd524e (diff) | |
download | llvm-bea8d021a32d871f43909f892c8069137fb34bfa.zip llvm-bea8d021a32d871f43909f892c8069137fb34bfa.tar.gz llvm-bea8d021a32d871f43909f892c8069137fb34bfa.tar.bz2 |
[llvm] Use *Map::lookup (NFC)
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 1b9436d..c8578f9 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -531,11 +531,7 @@ Option *CommandLineParser::LookupOption(SubCommand &Sub, StringRef &Arg, // If we have an equals sign, remember the value. if (EqualPos == StringRef::npos) { // Look up the option. - auto I = Sub.OptionsMap.find(Arg); - if (I == Sub.OptionsMap.end()) - return nullptr; - - return I != Sub.OptionsMap.end() ? I->second : nullptr; + return Sub.OptionsMap.lookup(Arg); } // If the argument before the = is a valid option name and the option allows |