diff --git a/llvm/test/tools/llvm-objdump/version.test b/llvm/test/tools/llvm-objdump/version.test new file mode 100644 --- /dev/null +++ b/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 +CHECK: Registered Targets: diff --git a/llvm/tools/llvm-objdump/ObjdumpOpts.td b/llvm/tools/llvm-objdump/ObjdumpOpts.td --- a/llvm/tools/llvm-objdump/ObjdumpOpts.td +++ b/llvm/tools/llvm-objdump/ObjdumpOpts.td @@ -14,6 +14,8 @@ def version : Flag<["--"], "version">, HelpText<"Display the version of this program">, Group; +def : Flag<["-"], "v">, Alias, HelpText<"Alias for --version">, + Group;