[PATCH] D56580: [llvm-symbolizer] Add -exe, -e as aliases to -obj
Dmitry Venikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 00:00:59 PST 2019
Quolyk created this revision.
Quolyk added reviewers: ruiu, rnk, fjricci, jhenderson.
Herald added a subscriber: llvm-commits.
Provides -exe, -e as aliases to -obj
Repository:
rL LLVM
https://reviews.llvm.org/D56580
Files:
docs/CommandGuide/llvm-symbolizer.rst
test/tools/llvm-symbolizer/sym.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
@@ -62,10 +62,18 @@
cl::desc("Default architecture "
"(for multi-arch objects)"));
+// -obj, -exe, -e
static cl::opt<std::string>
ClBinaryName("obj", cl::init(""),
cl::desc("Path to object file to be symbolized (if not provided, "
"object file should be specified for each input line)"));
+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::opt<std::string>
ClDwpName("dwp", cl::init(""),
Index: test/tools/llvm-symbolizer/sym.test
===================================================================
--- test/tools/llvm-symbolizer/sym.test
+++ test/tools/llvm-symbolizer/sym.test
@@ -22,6 +22,8 @@
RUN: llvm-symbolizer -inlining -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
RUN: echo "0x1" > %t.input
RUN: llvm-symbolizer -obj=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
+RUN: llvm-symbolizer -exe=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
+RUN: llvm-symbolizer -e=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
#CHECK: some text
#CHECK: 0x40054d
Index: docs/CommandGuide/llvm-symbolizer.rst
===================================================================
--- docs/CommandGuide/llvm-symbolizer.rst
+++ docs/CommandGuide/llvm-symbolizer.rst
@@ -68,7 +68,7 @@
OPTIONS
-------
-.. option:: -obj
+.. option:: -obj, -exe, -e
Path to object file to be symbolized.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56580.181212.patch
Type: text/x-patch
Size: 1979 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190111/c33d197e/attachment.bin>
More information about the llvm-commits
mailing list