[llvm] r351043 - [llvm-symbolizer] Add -addresses, -a as aliases for -print-address
Dmitry Venikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 14 02:10:51 PST 2019
Author: quolyk
Date: Mon Jan 14 02:10:51 2019
New Revision: 351043
URL: http://llvm.org/viewvc/llvm-project?rev=351043&view=rev
Log:
[llvm-symbolizer] Add -addresses, -a as aliases for -print-address
Summary: Provides -addresses, -a as aliases for -print-address. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40067.
Reviewers: jhenderson, ruiu, rnk, fjricci
Reviewed By: jhenderson
Subscribers: rupprecht, llvm-commits
Differential Revision: https://reviews.llvm.org/D56635
Modified:
llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
llvm/trunk/test/tools/llvm-symbolizer/sym.test
llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
Modified: llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst?rev=351043&r1=351042&r2=351043&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst (original)
+++ llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst Mon Jan 14 02:10:51 2019
@@ -106,7 +106,7 @@ OPTIONS
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.
Modified: llvm/trunk/test/tools/llvm-symbolizer/sym.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/sym.test?rev=351043&r1=351042&r2=351043&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/sym.test (original)
+++ llvm/trunk/test/tools/llvm-symbolizer/sym.test Mon Jan 14 02:10:51 2019
@@ -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
Modified: llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp?rev=351043&r1=351042&r2=351043&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp (original)
+++ llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp Mon Jan 14 02:10:51 2019
@@ -83,9 +83,17 @@ static cl::list<std::string>
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>
More information about the llvm-commits
mailing list