Page MenuHomePhabricator

D56542.id.diff
No OneTemporary

File Metadata

Created
Thu, Aug 22, 2:01 PM

D56542.id.diff

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),

Event Timeline