[yaml2obj] Refactor command line parsing
authorFangrui Song <maskray@google.com>
Tue, 4 Feb 2020 18:45:07 +0000 (10:45 -0800)
committerFangrui Song <maskray@google.com>
Thu, 6 Feb 2020 09:11:58 +0000 (01:11 -0800)
commita29a9a34f49fe674b259ef06a5044684401233a9
treebdd51dc413f18fe10e09ec9c5d98982f7309b443
parentfd0abcbfc18f9ed250ce3a95e1a979f0c01649ec
[yaml2obj] Refactor command line parsing

* Hide unrelated options.
* Add "OVERVIEW: " to yaml2obj -h/--help.
* Place options under a yaml2obj category.
* Disallow -docnum. Currently -docnum is the only yaml2obj specific long option that is affected.
* Specify `cl::init("-")` and `cl::Prefix` for OutputFilename. The
  latter allows `-ofile`

Reviewed By: grimar, jhenderson

Differential Revision: https://reviews.llvm.org/D73982
llvm/test/tools/yaml2obj/help.test [new file with mode: 0644]
llvm/test/tools/yaml2obj/invalid-output-file.yaml [deleted file]
llvm/test/tools/yaml2obj/output-file.yaml [new file with mode: 0644]
llvm/tools/yaml2obj/yaml2obj.cpp