[CommandLine] Allow grouping options which can have values.
authorIgor Kudrin <ikudrin@accesssoftek.com>
Fri, 1 Mar 2019 09:22:42 +0000 (09:22 +0000)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Fri, 1 Mar 2019 09:22:42 +0000 (09:22 +0000)
commita38432cefb08657ccaae51679dddb1ce4de096d0
tree3ffbd166e5ea2670a8652e3af5656c3831c9f0f4
parent875f05828d95251abe7c943d79399a3b1c80db12
[CommandLine] Allow grouping options which can have values.

This patch allows all forms of values for options to be used at the end
of a group. With the fix, it is possible to follow the way GNU binutils
tools handle grouping options better. For example, the -j option can be
used with objdump in any of the following ways:

$ objdump -d -j .text a.o
$ objdump -d -j.text a.o
$ objdump -dj .text a.o
$ objdump -dj.text a.o

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

llvm-svn: 355185
llvm/docs/CommandLine.rst
llvm/include/llvm/Support/CommandLine.h
llvm/lib/Support/CommandLine.cpp
llvm/tools/llvm-readobj/llvm-readobj.cpp
llvm/unittests/Support/CommandLineTest.cpp