[llvm] r351936 - [llvm-symbolizer] Allow single letter command flags grouping.
Dmitry Venikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 23 01:49:37 PST 2019
Author: quolyk
Date: Wed Jan 23 01:49:37 2019
New Revision: 351936
URL: http://llvm.org/viewvc/llvm-project?rev=351936&view=rev
Log:
[llvm-symbolizer] Allow single letter command flags grouping.
Summary: Currently llvm-symbolizer doesn't allow flags combining. This patch allows such grouping behavior just like addr2line. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40304
Reviewers: jhenderson, ruiu
Reviewed By: jhenderson
Subscribers: rupprecht, llvm-commits
Differential Revision: https://reviews.llvm.org/D57046
Added:
llvm/trunk/test/tools/llvm-symbolizer/flag-grouping.test
Modified:
llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
Added: llvm/trunk/test/tools/llvm-symbolizer/flag-grouping.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/flag-grouping.test?rev=351936&view=auto
==============================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/flag-grouping.test (added)
+++ llvm/trunk/test/tools/llvm-symbolizer/flag-grouping.test Wed Jan 23 01:49:37 2019
@@ -0,0 +1,7 @@
+RUN: llvm-symbolizer -inlining -apC -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+
+CHECK: some text
+CHECK: 0x40054d: inctwo
+CHECK: (inlined by) inc
+CHECK (inlined by) main
+CHECK: some text2
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=351936&r1=351935&r2=351936&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp (original)
+++ llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp Wed Jan 23 01:49:37 2019
@@ -65,7 +65,7 @@ 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));
+ cl::NotHidden, cl::aliasopt(ClDemangle), cl::Grouping);
static cl::opt<bool>
ClNoDemangle("no-demangle", cl::init(false),
cl::desc("Don't demangle function names"));
@@ -105,7 +105,7 @@ ClPrintAddressAliasAddresses("addresses"
cl::NotHidden, cl::aliasopt(ClPrintAddress));
static cl::alias
ClPrintAddressAliasA("a", cl::desc("Alias for -print-address"),
- cl::NotHidden, cl::aliasopt(ClPrintAddress));
+ cl::NotHidden, cl::aliasopt(ClPrintAddress), cl::Grouping);
// -pretty-print, -p
static cl::opt<bool>
@@ -113,7 +113,7 @@ static cl::opt<bool>
cl::desc("Make the output more human friendly"));
static cl::alias ClPrettyPrintShort("p", cl::desc("Alias for -pretty-print"),
cl::NotHidden,
- cl::aliasopt(ClPrettyPrint));
+ cl::aliasopt(ClPrettyPrint), cl::Grouping);
static cl::opt<int> ClPrintSourceContextLines(
"print-source-context-lines", cl::init(0),
More information about the llvm-commits
mailing list