Skip to content

Commit

Permalink
[llvm-symbolizer] Add -C as a short alias to -demangle
Browse files Browse the repository at this point in the history
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

llvm-svn: 351300
  • Loading branch information
Quolyk committed Jan 16, 2019
1 parent 973eab8 commit d3f21d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/docs/CommandGuide/llvm-symbolizer.rst
Expand Up @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions llvm/test/DebugInfo/llvm-symbolizer.test
Expand Up @@ -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
4 changes: 4 additions & 0 deletions llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
Expand Up @@ -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 "
Expand Down

0 comments on commit d3f21d3

Please sign in to comment.