aboutsummaryrefslogtreecommitdiff
path: root/MinGW
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
commit02536991a6000c5c0d1ec5f57ca25f2ef7b755e8 (patch)
tree7e97172dd79e288a687d499779d778dca267ddf0 /MinGW
parentdd555f13819bbdedfcdc3852a7d1591bd73df0f8 (diff)
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.) git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@365200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'MinGW')
-rw-r--r--MinGW/Driver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/MinGW/Driver.cpp b/MinGW/Driver.cpp
index 979d3091f..62d898240 100644
--- a/MinGW/Driver.cpp
+++ b/MinGW/Driver.cpp
@@ -105,7 +105,7 @@ opt::InputArgList MinGWOptTable::parse(ArrayRef<const char *> Argv) {
if (MissingCount)
fatal(StringRef(Args.getArgString(MissingIndex)) + ": missing argument");
for (auto *Arg : Args.filtered(OPT_UNKNOWN))
- fatal("unknown argument: " + Arg->getSpelling());
+ fatal("unknown argument: " + Arg->getAsString(Args));
return Args;
}