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/llvm/trunk@365200
91177308-0d34-0410-b5e6-
96231b3b80d8
}
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";
return 1;
}
for (auto *Arg : Args.filtered(OPT_UNKNOWN))
- llvm::errs() << "ignoring unknown argument: " << Arg->getSpelling() << "\n";
+ llvm::errs() << "ignoring unknown argument: " << Arg->getAsString(Args)
+ << "\n";
// Handle /help
if (Args.hasArg(OPT_help)) {