[PATCH] D105532: [llvm-readobj] Switch command line parsing from llvm::cl to OptTable
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 6 23:34:43 PDT 2021
MaskRay created this revision.
MaskRay added reviewers: jhenderson, rupprecht.
Herald added subscribers: mgorny, emaste.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Behavior changes:
- `-t=d` is removed. Use `-t d` instead.
- `--demangle=false` and `--demangle=0` cannot be used. Omit the option.
instead.
- `--help-list` is removed. This is a `cl::` specific option.
OptTable avoids global option collision if we decide to support multiplexing for binary utilities.
- One-dash long options are still supported.
- `--section-mapping=false` (D57365 <https://reviews.llvm.org/D57365>) is strange but is kept for now.
- Many `cl::opt` variables were unnecessarily external. I added `static` whenever appropriate.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105532
Files:
llvm/test/Object/invalid.test
llvm/test/tools/llvm-readobj/ELF/demangle.test
llvm/test/tools/llvm-readobj/ELF/grouped.test
llvm/test/tools/llvm-readobj/ELF/hex-dump.test
llvm/test/tools/llvm-readobj/ELF/output-style.test
llvm/test/tools/llvm-readobj/ELF/string-dump.test
llvm/test/tools/llvm-readobj/basic.test
llvm/test/tools/yaml2obj/ELF/shstrtab.yaml
llvm/tools/llvm-readobj/CMakeLists.txt
llvm/tools/llvm-readobj/Opts.td
llvm/tools/llvm-readobj/llvm-readobj.cpp
llvm/tools/llvm-readobj/llvm-readobj.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105532.356876.patch
Type: text/x-patch
Size: 48754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210707/27d0e4f0/attachment.bin>
More information about the llvm-commits
mailing list