[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:37:29 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350832: [llvm-symbolizer] Add -p as alias to -pretty-print (authored by Quolyk, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56542/new/
https://reviews.llvm.org/D56542
Files:
llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
llvm/trunk/test/tools/llvm-symbolizer/sym.test
llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
Index: llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
===================================================================
--- llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
+++ llvm/trunk/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.
Index: llvm/trunk/test/tools/llvm-symbolizer/sym.test
===================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/sym.test
+++ llvm/trunk/test/tools/llvm-symbolizer/sym.test
@@ -18,9 +18,10 @@
#Build as : clang -g -O2 addr.c
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 -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
+RUN: llvm-symbolizer -obj=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
#CHECK: some text
#CHECK: 0x40054d
Index: llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
===================================================================
--- llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ llvm/trunk/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),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56542.181060.patch
Type: text/x-patch
Size: 2411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190110/d376ce25/attachment.bin>
More information about the llvm-commits
mailing list