aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/CommandLine.cpp
diff options
context:
space:
mode:
authorIgor Kudrin <ikudrin@accesssoftek.com>2023-12-13 20:12:33 -0800
committerIgor Kudrin <ikudrin@accesssoftek.com>2023-12-13 20:12:33 -0800
commit4f1ddf7523c0bbb4075b1682dbe2278080642eee (patch)
treecfbe9145e478d294a5d1d874ec66369b5437e603 /llvm/lib/Support/CommandLine.cpp
parent8abc80eeb0cd18de2365fcadc39315a2918c93bf (diff)
downloadllvm-4f1ddf7523c0bbb4075b1682dbe2278080642eee.zip
llvm-4f1ddf7523c0bbb4075b1682dbe2278080642eee.tar.gz
llvm-4f1ddf7523c0bbb4075b1682dbe2278080642eee.tar.bz2
[CommandLine] Remove unused variable 'NearestHandler' (fixup for #74811)
Buildbots reported: .../CommandLine.cpp:1626:13: error: variable 'NearestHandler' set but not used [-Werror,-Wunused-but-set-variable]
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r--llvm/lib/Support/CommandLine.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index bac48ff..088b4e4 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -1623,7 +1623,6 @@ bool CommandLineParser::ParseCommandLineOptions(int argc,
bool DashDashFound = false; // Have we read '--'?
for (int i = FirstArg; i < argc; ++i) {
Option *Handler = nullptr;
- Option *NearestHandler = nullptr;
std::string NearestHandlerString;
StringRef Value;
StringRef ArgName = "";
@@ -1703,8 +1702,7 @@ bool CommandLineParser::ParseCommandLineOptions(int argc,
// Otherwise, look for the closest available option to report to the user
// in the upcoming error.
if (!Handler && SinkOpts.empty())
- NearestHandler =
- LookupNearestOption(ArgName, OptionsMap, NearestHandlerString);
+ LookupNearestOption(ArgName, OptionsMap, NearestHandlerString);
}
if (!Handler) {