[PATCH] D60196: [llvm-symbolizer] Allow more flexible usage of -e

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 08:02:53 PDT 2019


ikudrin updated this revision to Diff 193499.
ikudrin retitled this revision from "[llvm-symbolizer] Add grouping for -e" to "[llvm-symbolizer] Allow more flexible usage of -e".
ikudrin edited the summary of this revision.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60196/new/

https://reviews.llvm.org/D60196

Files:
  test/tools/llvm-symbolizer/basic.s
  test/tools/llvm-symbolizer/flag-grouping.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
@@ -94,10 +94,9 @@
 static cl::alias
 ClBinaryNameAliasExe("exe", cl::desc("Alias for -obj"),
                      cl::NotHidden, cl::aliasopt(ClBinaryName));
-static cl::alias
-ClBinaryNameAliasE("e", cl::desc("Alias for -obj"),
-                   cl::NotHidden, cl::aliasopt(ClBinaryName));
-
+static cl::alias ClBinaryNameAliasE("e", cl::desc("Alias for -obj"),
+                                    cl::NotHidden, cl::Grouping, cl::Prefix,
+                                    cl::aliasopt(ClBinaryName));
 
 static cl::opt<std::string>
     ClDwpName("dwp", cl::init(""),
Index: test/tools/llvm-symbolizer/flag-grouping.test
===================================================================
--- test/tools/llvm-symbolizer/flag-grouping.test
+++ test/tools/llvm-symbolizer/flag-grouping.test
@@ -1,4 +1,7 @@
 RUN: llvm-symbolizer -apCi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer -apCie %p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer -apCie=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer -apCie%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
 
 CHECK: some text
 CHECK: 0x40054d: inctwo
Index: test/tools/llvm-symbolizer/basic.s
===================================================================
--- test/tools/llvm-symbolizer/basic.s
+++ test/tools/llvm-symbolizer/basic.s
@@ -17,7 +17,9 @@
 
 # Check --obj aliases --exe, -e
 # RUN: llvm-symbolizer 0xa 0xb --exe=%t.o | FileCheck %s
+# RUN: llvm-symbolizer 0xa 0xb -e %t.o | FileCheck %s
 # RUN: llvm-symbolizer 0xa 0xb -e=%t.o | FileCheck %s
+# RUN: llvm-symbolizer 0xa 0xb -e%t.o | FileCheck %s
 
 # CHECK: basic.s:5:0
 # CHECK: basic.s:6:0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60196.193499.patch
Type: text/x-patch
Size: 1917 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190403/8c09d5d8/attachment-0001.bin>


More information about the llvm-commits mailing list