[PATCH] D56542: [llvm-symbolizer] Add -p as alias to -pretty-print

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 10 06:27:16 PST 2019


jhenderson added a comment.

Thanks for working on this!



================
Comment at: test/tools/llvm-symbolizer/sym.test:22
 RUN: llvm-symbolizer -inlining -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck --check-prefix="PRETTY" %s 
+RUN: llvm-symbolizer -inlining -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck --check-prefix="PRETTY" %s
 RUN: echo "0x1" > %t.input
----------------
Nit, here and in the line above we're being inconsistent with the number of '-' characters used to prefix options (single dash for llvm-symbolizer, double for FileCheck). It would be nice if they were consistent. I have a marginal preference for double dash, but I don't mind if you want to go the other way.


================
Comment at: tools/llvm-symbolizer/llvm-symbolizer.cpp:86
                   cl::desc("Make the output more human friendly"));
+static cl::alias ClPrettyPrintShort("p", cl::desc("Alias for --pretty-print"), cl::aliasopt(ClPrettyPrint));
 
----------------
It looks like this line needs clang-formatting.

Aliases aren't in the help text by default, but you can make them be by adding the `cl::NotHidden` attribute. I think you should do that.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56542





More information about the llvm-commits mailing list