[llvm-ar] Implement the V modifier as an alias for --version

Summary: Also update the help modifier (h) so that it works as a modifier and not just as a standalone `h`. For example, `llvm-ar h` prints the help message, but `llvm-ar xh` currently prints `unknown option h`.

Reviewers: MaskRay, gbreynoo

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69007

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375028 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jordan Rupprecht
2019-10-16 18:39:52 +00:00
parent b531baef64
commit ca30c1a99c
3 changed files with 25 additions and 1 deletions
+5
View File
@@ -1,5 +1,10 @@
## Show that the help message for llvm-ar can be printed with either the long
## flag -help or with the h modifier.
# RUN: llvm-ar h | FileCheck %s
# RUN: llvm-ar xh | FileCheck %s
# RUN: llvm-ar -h | FileCheck %s
# RUN: llvm-ar -xh | FileCheck %s
# RUN: llvm-ar -help | FileCheck %s
# RUN: llvm-ar --help | FileCheck %s
+11
View File
@@ -0,0 +1,11 @@
## Show that the version for llvm-ar can be printed with either the long flag
## -version or with the V modifier.
RUN: llvm-ar V | FileCheck %s
RUN: llvm-ar xV | FileCheck %s
RUN: llvm-ar -V | FileCheck %s
RUN: llvm-ar -xV | FileCheck %s
RUN: llvm-ar -version | FileCheck %s
RUN: llvm-ar --version | FileCheck %s
CHECK: version