This is an archive of the discontinued LLVM Phabricator instance.

Improve error message for an unknown --plugin-opt.
ClosedPublic

Authored by ruiu on Mar 29 2018, 6:15 PM.

Details

Summary

Before:

$ ld.lld --plugin-opt=-foo
ld.lld: --Unknown command line argument '-abc'

After:

$ ld.lld --plugin-opt=-foo
ld.lld: --plugin-opt: ld.lld --Unknown command line argument '-abc'

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

ruiu created this revision.Mar 29 2018, 6:15 PM
grimar accepted this revision.Mar 30 2018, 1:23 AM

LGTM. Thanks!

lld/ELF/Driver.cpp
609 ↗(On Diff #140375)

I would probably add ...,/*Overview=*/"", ...) as I had to look what this parameter is.

This revision is now accepted and ready to land.Mar 30 2018, 1:23 AM
ruiu added inline comments.Mar 30 2018, 10:20 AM
lld/ELF/Driver.cpp
609 ↗(On Diff #140375)

I honestly don't think that's helpful because we don't explain what is "Overview" after all (and even I don't know what it is.)

This revision was automatically updated to reflect the committed changes.