From 7b1c8168c7912e2cb5b10ad56f836ccc552e3c0e Mon Sep 17 00:00:00 2001 From: Jordan Rupprecht Date: Fri, 21 Sep 2018 00:47:31 +0000 Subject: [llvm-objcopy/llvm-strip]: handle --version Summary: Implement --version for objcopy and strip. I think there are LLVM utilities that automatically handle this, but that doesn't seem to work with custom parsing since this binary handles both objcopy and strip, so it uses custom parsing. This fixes PR38298 Reviewers: jhenderson, alexshap, jakehehrlich Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52328 llvm-svn: 342702 --- llvm/tools/llvm-objcopy/StripOpts.td | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/tools/llvm-objcopy/StripOpts.td') diff --git a/llvm/tools/llvm-objcopy/StripOpts.td b/llvm/tools/llvm-objcopy/StripOpts.td index 5abc23fb577..821dfa3b277 100644 --- a/llvm/tools/llvm-objcopy/StripOpts.td +++ b/llvm/tools/llvm-objcopy/StripOpts.td @@ -47,6 +47,10 @@ def K : JoinedOrSeparate<["-"], "K">, def discard_all : Flag<["-", "--"], "discard-all">, HelpText<"Remove all local symbols except file and section symbols">; + +def version : Flag<[ "-", "--" ], "version">, + HelpText<"Print the version and exit.">; + def x : Flag<["-"], "x">, Alias; -- cgit v1.2.3