diff --git a/llvm/docs/CommandGuide/llvm-symbolizer.rst b/llvm/docs/CommandGuide/llvm-symbolizer.rst index 1b8986d6557d..3c7a26e486f3 100644 --- a/llvm/docs/CommandGuide/llvm-symbolizer.rst +++ b/llvm/docs/CommandGuide/llvm-symbolizer.rst @@ -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. diff --git a/llvm/test/DebugInfo/llvm-symbolizer.test b/llvm/test/DebugInfo/llvm-symbolizer.test index 5a5e06c37896..91d9a422bbe3 100644 --- a/llvm/test/DebugInfo/llvm-symbolizer.test +++ b/llvm/test/DebugInfo/llvm-symbolizer.test @@ -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 diff --git a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp index e922bc962002..9d19f994b739 100644 --- a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp +++ b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp @@ -55,8 +55,12 @@ static cl::opt ClPrintInlining("inlining", cl::init(true), cl::desc("Print all inlined frames for a given address")); +// -demangle, -C static cl::opt 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 ClDefaultArch("default-arch", cl::init(""), cl::desc("Default architecture "