1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
llvm-mirror/lib
Zachary Turner db15673748 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
..
Analysis Typos. NFC. 2016-06-28 17:19:10 +00:00
AsmParser Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
Bitcode Remangle intrinsics names when types are renamed 2016-06-24 15:10:29 +00:00
CodeGen Fix typo 2016-06-28 19:12:28 +00:00
DebugInfo [CodeView] Healthy paranoia around strings 2016-06-24 19:34:41 +00:00
ExecutionEngine Fix lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp for r273701 2016-06-24 22:38:30 +00:00
Fuzzer [libfuzzer] moving is_ascii handler inside mutation dispatcher. 2016-06-23 20:44:48 +00:00
IR Support arbitrary addrspace pointers in masked load/store intrinsics 2016-06-28 18:27:25 +00:00
IRReader
LibDriver LibDriver: Silently do nothing when provided no inputs. 2016-04-13 19:36:04 +00:00
LineEditor Fix Clang-tidy modernize-deprecated-headers warnings in some files; other minor fixes. 2016-03-28 17:40:08 +00:00
Linker IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
LTO [UpdateCompilerUsed] API rename and cleanup, suggested by Rafaael. 2016-06-22 19:50:42 +00:00
MC [ARM] Fix Thumb text sections' flags under COFF/Windows 2016-06-27 14:42:20 +00:00
Object Change all but the last ErrorOr<...> use for MachOUniversalBinary to Expected<...> to 2016-06-27 21:39:39 +00:00
ObjectYAML [yaml2obj] Remove --format option in favor of YAML tags 2016-06-27 19:53:53 +00:00
Option Option parser: class for consuming a joined arg in addition to all remaining args 2016-04-15 00:23:30 +00:00
Passes [PM] Improve the debugging and logging facilities of the CGSCC bits of 2016-06-27 23:26:08 +00:00
ProfileData [Coverage] Clarify ownership of a MemoryBuffer in the reader (NFC) 2016-06-21 22:22:33 +00:00
Support Update llvm command line parser to support subcommands. 2016-06-28 20:09:47 +00:00
TableGen Avoid copies of std::strings and APInt/APFloats where we only read from it 2016-06-08 10:01:20 +00:00
Target AMDGPU: Fix global isel crashes 2016-06-28 17:42:09 +00:00
Transforms [LLE] Don't hoist conditionally executed loads 2016-06-28 04:02:47 +00:00
CMakeLists.txt
LLVMBuild.txt