[PATCH] D101483: [llvm-objdump] add -v alias for --version
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 29 10:17:55 PDT 2021
nickdesaulniers updated this revision to Diff 341568.
nickdesaulniers added a comment.
- update command guide, add "version" to test
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101483/new/
https://reviews.llvm.org/D101483
Files:
llvm/docs/CommandGuide/llvm-objdump.rst
llvm/test/tools/llvm-objdump/version.test
llvm/tools/llvm-objdump/ObjdumpOpts.td
Index: llvm/tools/llvm-objdump/ObjdumpOpts.td
===================================================================
--- llvm/tools/llvm-objdump/ObjdumpOpts.td
+++ llvm/tools/llvm-objdump/ObjdumpOpts.td
@@ -14,6 +14,8 @@
def version : Flag<["--"], "version">,
HelpText<"Display the version of this program">,
Group<grp_generic>;
+def : Flag<["-"], "v">, Alias<version>, HelpText<"Alias for --version">,
+ Group<grp_generic>;
Index: llvm/test/tools/llvm-objdump/version.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-objdump/version.test
@@ -0,0 +1,5 @@
+RUN: llvm-objdump --version | FileCheck %s
+RUN: llvm-objdump -v | FileCheck %s
+
+CHECK: LLVM version
+CHECK: Registered Targets:
Index: llvm/docs/CommandGuide/llvm-objdump.rst
===================================================================
--- llvm/docs/CommandGuide/llvm-objdump.rst
+++ llvm/docs/CommandGuide/llvm-objdump.rst
@@ -93,7 +93,7 @@
Display the unwind info of the input(s).
-.. option:: --version
+.. option:: -v, --version
Display the version of the :program:`llvm-objdump` executable. Does not stack
with other commands.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101483.341568.patch
Type: text/x-patch
Size: 1187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210429/b1f474c6/attachment.bin>
More information about the llvm-commits
mailing list