[PATCH] D105532: [llvm-readobj] Switch command line parsing from llvm::cl to OptTable

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 01:05:17 PDT 2021


jhenderson added inline comments.


================
Comment at: llvm/tools/llvm-readobj/Opts.td:53
+defm elf_output_style : Eq<"elf-output-style", "Specify ELF dump style">, Group<grp_elf>;
+def section_groups : FF<"section-groups", "Display section groups">, Group<grp_elf>;
+def gnu_hash_table : FF<"gnu-hash-table", "Display .gnu.hash section">, Group<grp_elf>;
----------------
This is no longer in alphabetical order (ditto histogram above).


================
Comment at: llvm/tools/llvm-readobj/llvm-readobj.cpp:229
+  opts::DynamicTable = Args.hasArg(OPT_dynamic_table);
+  opts::HashHistogram = Args.hasArg(OPT_histogram);
+  opts::ELFLinkerOptions = Args.hasArg(OPT_elf_linker_options);
----------------
Reorder alphabetically.


================
Comment at: llvm/tools/llvm-readobj/llvm-readobj.cpp:567
+    // This needs to contain the word "GNU", libtool looks for that string.
+    outs() << "llvm-nm, compatible with GNU nm" << '\n';
+    cl::PrintVersionMessage();
----------------
Might want to fix this line ;) (actually do you need it at all?)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105532/new/

https://reviews.llvm.org/D105532



More information about the llvm-commits mailing list