HomePhabricator

lld, llvm-dlltool, llvm-lib: Use getAsString() instead of getSpelling() for…

Authored by thakis on Jul 5 2019, 5:31 AM.

Description

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

Details