[llvm] b897729 - [llvm-install-name-tool] Add -V flag

Alexander Shaposhnikov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 17:24:59 PDT 2020


Author: Alexander Shaposhnikov
Date: 2020-09-09T17:11:08-07:00
New Revision: b897729a39d35f95173852fe97da3602ec574c1d

URL: https://github.com/llvm/llvm-project/commit/b897729a39d35f95173852fe97da3602ec574c1d
DIFF: https://github.com/llvm/llvm-project/commit/b897729a39d35f95173852fe97da3602ec574c1d.diff

LOG: [llvm-install-name-tool] Add -V flag

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

Differential revision: https://reviews.llvm.org/D87264

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-objcopy/tool-version.test b/llvm/test/tools/llvm-objcopy/tool-version.test
index 5fe33eb8e717..a6cc8f96221d 100644
--- a/llvm/test/tools/llvm-objcopy/tool-version.test
+++ b/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

diff  --git a/llvm/tools/llvm-objcopy/InstallNameToolOpts.td b/llvm/tools/llvm-objcopy/InstallNameToolOpts.td
index 04ffe62c42fc..7998041513cb 100644
--- a/llvm/tools/llvm-objcopy/InstallNameToolOpts.td
+++ b/llvm/tools/llvm-objcopy/InstallNameToolOpts.td
@@ -32,3 +32,7 @@ def change: MultiArg<["-", "--"], "change", 2>,
 
 def version : Flag<["--"], "version">,
               HelpText<"Print the version and exit.">;
+
+def V : Flag<["-"], "V">,
+        Alias<version>,
+        HelpText<"Alias for --version">;


        


More information about the llvm-commits mailing list