[PATCH] D56635: [llvm-symbolizer] Add -addresses, -a as aliases for -print-address
Dmitry Venikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 14 02:14:51 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL351043: [llvm-symbolizer] Add -addresses, -a as aliases for -print-address (authored by Quolyk, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56635/new/
https://reviews.llvm.org/D56635
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/tools/llvm-symbolizer/llvm-symbolizer.cpp
===================================================================
--- llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -83,9 +83,17 @@
ClDsymHint("dsym-hint", cl::ZeroOrMore,
cl::desc("Path to .dSYM bundles to search for debug info for the "
"object files"));
+
+// -print-address, -addresses, -a
static cl::opt<bool>
- ClPrintAddress("print-address", cl::init(false),
- cl::desc("Show address before line information"));
+ClPrintAddress("print-address", cl::init(false),
+ cl::desc("Show address before line information"));
+static cl::alias
+ClPrintAddressAliasAddresses("addresses", cl::desc("Alias for -print-address"),
+ cl::NotHidden, cl::aliasopt(ClPrintAddress));
+static cl::alias
+ClPrintAddressAliasA("a", cl::desc("Alias for -print-address"),
+ cl::NotHidden, cl::aliasopt(ClPrintAddress));
// -pretty-print, -p
static cl::opt<bool>
Index: llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
===================================================================
--- llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
+++ llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
@@ -106,7 +106,7 @@
location, look for the debug info at the .dSYM path provided via the
``-dsym-hint`` flag. This flag can be used multiple times.
-.. option:: -print-address
+.. option:: -print-address, -addresses, -a
Print address before the source code location. Defaults to false.
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,6 +18,8 @@
#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 -addresses -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer -a -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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56635.181513.patch
Type: text/x-patch
Size: 2479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190114/162e6b7d/attachment.bin>
More information about the llvm-commits
mailing list