[PATCH] D56542: [llvm-symbolizer] Add -p as alias to -pretty-print
Dmitry Venikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 10 07:02:34 PST 2019
Quolyk updated this revision to Diff 181050.
Quolyk added a comment.
Add cl::NotHidden option
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56542/new/
https://reviews.llvm.org/D56542
Files:
docs/CommandGuide/llvm-symbolizer.rst
test/tools/llvm-symbolizer/sym.test
tools/llvm-symbolizer/llvm-symbolizer.cpp
Index: tools/llvm-symbolizer/llvm-symbolizer.cpp
===================================================================
--- tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -79,9 +79,13 @@
ClPrintAddress("print-address", cl::init(false),
cl::desc("Show address before line information"));
+// -pretty-print, -p
static cl::opt<bool>
ClPrettyPrint("pretty-print", cl::init(false),
cl::desc("Make the output more human friendly"));
+static cl::alias ClPrettyPrintShort("p", cl::desc("Alias for -pretty-print"),
+ cl::NotHidden,
+ cl::aliasopt(ClPrettyPrint));
static cl::opt<int> ClPrintSourceContextLines(
"print-source-context-lines", cl::init(0),
Index: test/tools/llvm-symbolizer/sym.test
===================================================================
--- test/tools/llvm-symbolizer/sym.test
+++ test/tools/llvm-symbolizer/sym.test
@@ -19,6 +19,7 @@
RUN: llvm-symbolizer -print-address -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
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
RUN: llvm-symbolizer -obj=%p/Inputs/zero < %t.input | FileCheck --check-prefix="ZERO" %s
Index: docs/CommandGuide/llvm-symbolizer.rst
===================================================================
--- docs/CommandGuide/llvm-symbolizer.rst
+++ docs/CommandGuide/llvm-symbolizer.rst
@@ -110,7 +110,7 @@
Print address before the source code location. Defaults to false.
-.. option:: -pretty-print
+.. option:: -pretty-print, -p
Print human readable output. If ``-inlining`` is specified, enclosing scope is
prefixed by (inlined by). Refer to listed examples.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56542.181050.patch
Type: text/x-patch
Size: 2008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190110/f4edef99/attachment.bin>
More information about the llvm-commits
mailing list