[PATCH] D56773: [llvm-symbolizer] Add -no-demangle as alias for -demangle=false
Dmitry Venikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 16 00:16:39 PST 2019
Quolyk created this revision.
Quolyk added reviewers: jhenderson, ruiu.
Herald added subscribers: llvm-commits, rupprecht, erik.pilkington.
Provides -no-demangle as alias for -demangle=false. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40075
Repository:
rL LLVM
https://reviews.llvm.org/D56773
Files:
docs/CommandGuide/llvm-symbolizer.rst
test/DebugInfo/llvm-symbolizer.test
tools/llvm-symbolizer/llvm-symbolizer.cpp
Index: tools/llvm-symbolizer/llvm-symbolizer.cpp
===================================================================
--- tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -55,12 +55,15 @@
ClPrintInlining("inlining", cl::init(true),
cl::desc("Print all inlined frames for a given address"));
-// -demangle, -C
+// -demangle, -C, -no-demangle
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<bool>
+ClNoDemangle("no-demangle", cl::desc("Alias for -demangle=false"),
+ cl::NotHidden);
static cl::opt<std::string> ClDefaultArch("default-arch", cl::init(""),
cl::desc("Default architecture "
@@ -203,7 +206,8 @@
llvm::sys::InitializeCOMRAII COM(llvm::sys::COMThreadingMode::MultiThreaded);
cl::ParseCommandLineOptions(argc, argv, "llvm-symbolizer\n");
- LLVMSymbolizer::Options Opts(ClPrintFunctions, ClUseSymbolTable, ClDemangle,
+ LLVMSymbolizer::Options Opts(ClPrintFunctions, ClUseSymbolTable,
+ ClDemangle || ClNoDemangle,
ClUseRelativeAddress, ClDefaultArch);
for (const auto &hint : ClDsymHint) {
Index: test/DebugInfo/llvm-symbolizer.test
===================================================================
--- test/DebugInfo/llvm-symbolizer.test
+++ test/DebugInfo/llvm-symbolizer.test
@@ -212,5 +212,7 @@
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
+RUN: llvm-symbolizer --functions=short -no-demangle < %t.input7 \
+RUN: | FileCheck %s --check-prefix=SHORT_FUNCTION_NAME
SHORT_FUNCTION_NAME-NOT: _Z1cv
Index: docs/CommandGuide/llvm-symbolizer.rst
===================================================================
--- docs/CommandGuide/llvm-symbolizer.rst
+++ docs/CommandGuide/llvm-symbolizer.rst
@@ -87,6 +87,10 @@
Print demangled function names. Defaults to true.
+.. option:: -no-demangle
+
+ Don't print demangled function names. Alias for ``-demangle=false``.
+
.. option:: -inlining
If a source code location is in an inlined function, prints all the
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56773.181984.patch
Type: text/x-patch
Size: 2423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190116/c9a7ebaa/attachment.bin>
More information about the llvm-commits
mailing list