summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ToolDrivers/llvm-dlltool
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-07-05 12:31:32 +0000
committerNico Weber <nicolasweber@gmx.de>2019-07-05 12:31:32 +0000
commita78027630133ac39a8edf09a91ca203a6a980dbe (patch)
tree4694158a3a0abbd3d5471a0bce4f8bc076bed178 /llvm/lib/ToolDrivers/llvm-dlltool
parent2478b62098415c2958ca5ec1354748fed8413ad2 (diff)
downloadbcm5719-llvm-a78027630133ac39a8edf09a91ca203a6a980dbe.tar.gz
bcm5719-llvm-a78027630133ac39a8edf09a91ca203a6a980dbe.zip
lld, llvm-dlltool, llvm-lib: Use getAsString() instead of getSpelling() for printing unknown args
Since OPT_UNKNOWN args never have any values and consist only of spelling (and are never aliased), this doesn't make any difference in practice, but it's more consistent with Arg's guidance to use getAsString() for diagnostics, and it matches what clang does. Also tweak two tests to use an unknown option that contains '=' for additional coverage while here. (The new tests pass fine with the old code too though.) llvm-svn: 365200
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-dlltool')
-rw-r--r--llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp b/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
index f894211b644..0b406cc531a 100644
--- a/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
+++ b/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
@@ -108,7 +108,8 @@ int llvm::dlltoolDriverMain(llvm::ArrayRef<const char *> ArgsArr) {
}
for (auto *Arg : Args.filtered(OPT_UNKNOWN))
- llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
+ llvm::errs() << "ignoring unknown argument: " << Arg->getAsString(Args)
+ << "\n";
if (!Args.hasArg(OPT_d)) {
llvm::errs() << "no definition file specified\n";
OpenPOWER on IntegriCloud