[llvm] r350925 - [llvm-symbolizer] Add -exe, -e as aliases to -obj
Dmitry Venikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 11 03:51:52 PST 2019
Author: quolyk
Date: Fri Jan 11 03:51:52 2019
New Revision: 350925
URL: http://llvm.org/viewvc/llvm-project?rev=350925&view=rev
Log:
[llvm-symbolizer] Add -exe, -e as aliases to -obj
Summary: Provides -exe, -e as aliases to -obj. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40071
Reviewers: ruiu, rnk, fjricci, jhenderson
Reviewed By: jhenderson
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D56580
Modified:
llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
llvm/trunk/test/tools/llvm-symbolizer/basic.s
llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp
Modified: llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst?rev=350925&r1=350924&r2=350925&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst (original)
+++ llvm/trunk/docs/CommandGuide/llvm-symbolizer.rst Fri Jan 11 03:51:52 2019
@@ -68,7 +68,7 @@ EXAMPLE
OPTIONS
-------
-.. option:: -obj
+.. option:: -obj, -exe, -e
Path to object file to be symbolized.
Modified: llvm/trunk/test/tools/llvm-symbolizer/basic.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-symbolizer/basic.s?rev=350925&r1=350924&r2=350925&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-symbolizer/basic.s (original)
+++ llvm/trunk/test/tools/llvm-symbolizer/basic.s Fri Jan 11 03:51:52 2019
@@ -15,5 +15,9 @@ foo:
# RUN: llvm-symbolizer 0xa 0xb --obj=%t.o | FileCheck %s
# RUN: llvm-symbolizer 10 11 --obj=%t.o | FileCheck %s
+# 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
+
# CHECK: basic.s:5:0
# CHECK: basic.s:6:0
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=350925&r1=350924&r2=350925&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp (original)
+++ llvm/trunk/tools/llvm-symbolizer/llvm-symbolizer.cpp Fri Jan 11 03:51:52 2019
@@ -62,10 +62,18 @@ static cl::opt<std::string> ClDefaultArc
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(""),
More information about the llvm-commits
mailing list