]> granicus.if.org Git - llvm/commitdiff
[llvm-symbolizer] Add -C as a short alias to -demangle
authorDmitry Venikov <quolyk@gmail.com>
Wed, 16 Jan 2019 07:05:58 +0000 (07:05 +0000)
committerDmitry Venikov <quolyk@gmail.com>
Wed, 16 Jan 2019 07:05:58 +0000 (07:05 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351300 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CommandGuide/llvm-symbolizer.rst
test/DebugInfo/llvm-symbolizer.test
tools/llvm-symbolizer/llvm-symbolizer.cpp

index 1b8986d6557d8794261a6b1e907dbb980000eb23..3c7a26e486f3aaca9452fd700f9ec2ebba60308d 100644 (file)
@@ -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.
 
index 5a5e06c378962f8d2d3f38c79b269817edb5c0dc..91d9a422bbe3bcf89cdb0cfddfffc80015baa2fe 100644 (file)
@@ -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
index e922bc96200290b88856f2a11c264bd1560b37f3..9d19f994b739e21def0e9e7e7099fbdeeff1b374 100644 (file)
@@ -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 "