diff --git a/llvm/test/tools/llvm-symbolizer/flag-grouping.test b/llvm/test/tools/llvm-symbolizer/flag-grouping.test new file mode 100644 index 000000000000..ec032689e15f --- /dev/null +++ b/llvm/test/tools/llvm-symbolizer/flag-grouping.test @@ -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 diff --git a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp index 7414a9db284c..7affb0fdd333 100644 --- a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp +++ b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp @@ -65,7 +65,7 @@ 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)); + cl::NotHidden, cl::aliasopt(ClDemangle), cl::Grouping); static cl::opt ClNoDemangle("no-demangle", cl::init(false), cl::desc("Don't demangle function names")); @@ -105,7 +105,7 @@ ClPrintAddressAliasAddresses("addresses", cl::desc("Alias for -print-address"), 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 @@ -113,7 +113,7 @@ static cl::opt 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 ClPrintSourceContextLines( "print-source-context-lines", cl::init(0),