[PATCH] D87264: [llvm-install-name-tool] Add -V flag

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 21:15:05 PDT 2020


alexshap created this revision.
alexshap added reviewers: jhenderson, smeenai, MaskRay.
Herald added a reviewer: rupprecht.
Herald added a project: LLVM.
alexshap requested review of this revision.

This diff adds -V alias for --version to make llvm-install-name-tool consistent with other tools (llvm-objcopy, llvm-strip, etc).

Test plan: make check-all


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87264

Files:
  llvm/test/tools/llvm-objcopy/tool-version.test
  llvm/tools/llvm-objcopy/InstallNameToolOpts.td


Index: llvm/tools/llvm-objcopy/InstallNameToolOpts.td
===================================================================
--- llvm/tools/llvm-objcopy/InstallNameToolOpts.td
+++ llvm/tools/llvm-objcopy/InstallNameToolOpts.td
@@ -32,3 +32,7 @@
 
 def version : Flag<["--"], "version">,
               HelpText<"Print the version and exit.">;
+
+def V : Flag<["-"], "V">,
+        Alias<version>,
+        HelpText<"Alias for --version">;
Index: llvm/test/tools/llvm-objcopy/tool-version.test
===================================================================
--- llvm/test/tools/llvm-objcopy/tool-version.test
+++ llvm/test/tools/llvm-objcopy/tool-version.test
@@ -5,6 +5,7 @@
 # RUN: llvm-strip -V | FileCheck --check-prefix=STRIP %s
 
 # RUN: llvm-install-name-tool --version | FileCheck %s
+# RUN: llvm-install-name-tool -V | FileCheck %s
 
 # OBJCOPY-DAG: {{ version }}
 # OBJCOPY-DAG: GNU objcopy


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87264.290399.patch
Type: text/x-patch
Size: 901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200908/9cc5be9c/attachment.bin>


More information about the llvm-commits mailing list