[llvm] r351300 - [llvm-symbolizer] Add -C as a short alias to -demangle
Dmitry Venikov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 15 23:05:58 PST 2019
Author: quolyk
Date: Tue Jan 15 23:05:58 2019
New Revision: 351300
URL: http://llvm.org/viewvc/llvm-project?rev=351300&view=rev
Log:
[llvm-symbolizer] Add -C as a short alias to -demangle
Summary: Provides -C as alias to -demangle. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40069.
Reviewers: jhenderson, ruiu, rnk, fjricci
Reviewed By: jhenderson, ruiu
Subscribers: rupprecht, erik.pilkington, llvm-commits
Differential Revision: https://reviews.llvm.org/D56591
Modified:
llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
llvm/trunk/test/DebugInfo/llvm-symbolizer.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=351300&r1=351299&r2=351300&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst (original)
+++ llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst Tue Jan 15 23:05:58 2019
@@ -83,7 +83,7 @@ OPTIONS
Prefer function names stored in symbol table to function names
in debug info sections. Defaults to true.
-.. option:: -demangle
+.. option:: -demangle, -C
Print demangled function names. Defaults to true.
Modified: llvm/trunk/test/DebugInfo/llvm-symbolizer.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/llvm-symbolizer.test?rev=351300&r1=351299&r2=351300&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer.test (original)
+++ llvm/trunk/test/DebugInfo/llvm-symbolizer.test Tue Jan 15 23:05:58 2019
@@ -210,5 +210,7 @@ STRIPPED: global_func
RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" > %t.input7
RUN: llvm-symbolizer --functions=short --demangle=false < %t.input7 \
RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
+RUN: llvm-symbolizer --functions=short -C=false < %t.input7 \
+RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
SHORT_FUNCTION_NAME-NOT: _Z1cv
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=351300&r1=351299&r2=351300&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp (original)
+++ llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp Tue Jan 15 23:05:58 2019
@@ -55,8 +55,12 @@ static cl::opt<bool>
ClPrintInlining("inlining", cl::init(true),
cl::desc("Print all inlined frames for a given address"));
+// -demangle, -C
static cl::opt<bool>
ClDemangle("demangle", cl::init(true), cl::desc("Demangle function names"));
+static cl::alias
+ClDemangleShort("C", cl::desc("Alias for -demangle"),
+ cl::NotHidden, cl::aliasopt(ClDemangle));
static cl::opt<std::string> ClDefaultArch("default-arch", cl::init(""),
cl::desc("Default architecture "
More information about the llvm-commits
mailing list