[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 06:04:33 PST 2019
Quolyk created this revision.
Herald added a subscriber: llvm-commits.
Provides -p as a short alias for -pretty-print
Repository:
rL LLVM
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,11 @@
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::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.181039.patch
Type: text/x-patch
Size: 1920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190110/6f2d5bf6/attachment.bin>
More information about the llvm-commits
mailing list