Go to file
Zachary Turner 2012d744f4 Update llvm command line parser to support subcommands.
This allows command line tools to use syntaxes like the following:

  llvm-foo.exe command1 -o1 -o2
  llvm-foo.exe command2 -p1 -p2

Where command1 and command2 contain completely different sets of
valid options.  This is backwards compatible with previous uses
of llvm cl which did not support subcommands, as any option
which specifies no optional subcommand (e.g. all existing
code) goes into a special "top level" subcommand that expects
dashed options to appear immediately after the program name.
For example, code which is subcommand unaware would generate
a command line such as the following, where no subcommand
is specified:

  llvm-foo.exe -q1 -q2

The top level subcommand can co-exist with actual subcommands,
as it is implemented as an actual subcommand which is searched
if no explicit subcommand is specified.  So llvm-foo.exe as
specified above could be written so as to support all three
aforementioned command lines simultaneously.

There is one additional "special" subcommand called AllSubCommands,
which can be used to inject an option into every subcommand.
This is useful to support things like help, so that commands
such as:

  llvm-foo.exe --help
  llvm-foo.exe command1 --help
  llvm-foo.exe command2 --help

All work and display the help for the selected subcommand
without having to explicitly go and write code to handle each
one separately.

This patch is submitted without an example of anything actually
using subcommands, but a followup patch will convert the
llvm-pdbdump tool to use subcommands.

Reviewed By: beanz
Differential Revision: http://reviews.llvm.org/D21485

llvm-svn: 274054
2016-06-28 20:09:47 +00:00
clang Fix unreasonably-precise CHECK. 2016-06-28 19:09:30 +00:00
clang-tools-extra [clang-tidy] Do not match on lambdas. 2016-06-28 14:19:41 +00:00
compiler-rt [CMake] In r273957, I deleted a line that shouldn't have been removed. 2016-06-28 16:30:23 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc configure: Remove device specific defines 2016-06-17 20:30:50 +00:00
libcxx Use WG21.link reflector to get to issues, rather than linking directly 2016-06-28 14:13:28 +00:00
libcxxabi Fix [libcxxabi] Fix warning about uninitialized const member. 2016-06-15 19:59:16 +00:00
libunwind [libunwind] Improve unwinder stack usage - III 2016-06-14 15:51:01 +00:00
lld [lld][MachO] Remove SimpleFile::definedAtoms(). 2016-06-28 18:42:33 +00:00
lldb 64-bit LEB values are not always correctly decoded due to a casting issue, now they are. 2016-06-28 17:14:18 +00:00
llgo [llgo] llgoi: separate evaluation from printing 2016-04-25 01:18:20 +00:00
llvm Update llvm command line parser to support subcommands. 2016-06-28 20:09:47 +00:00
openmp Fix bugs in TAS and futex lock 2016-06-28 19:37:24 +00:00
parallel-libs Change mailing list names in README 2016-06-24 22:50:09 +00:00
polly Create a dedicated header file for ScopBuilder. NFC. 2016-06-28 01:37:28 +00:00