Commit Graph

6 Commits

Author SHA1 Message Date
Hans Wennborg 5fdcf86861 Option parsing: add support for alias arguments.
This makes option aliases more powerful by enabling them to
pass along arguments to the option they're aliasing.

For example, if we have a joined option "-foo=", we can now
specify a flag option "-bar" to be an alias of that, with the
argument "baz".

This is especially useful for the cl.exe compatible clang driver,
where many options are aliases. For example, this patch enables
us to alias "/Ox" to "-O3" (-O is a joined option), and "/WX" to
"-Werror" (again, -W is a joined option).

Differential Revision: http://llvm-reviews.chandlerc.com/D1245

llvm-svn: 187537
2013-07-31 22:44:41 +00:00
Richard Trieu 46978d41e6 Silence gcc warning.
llvm-svn: 186879
2013-07-22 21:29:28 +00:00
Hans Wennborg 31d6fd84e6 Option parsing: allow aliases in groups
Option aliases in option groups were previously disallowed by an assert.
As far as I can tell, there was no technical reason for this, and I would
like to be able to put cl.exe compatible options in their own group for Clang,
so let's change the assert.

llvm-svn: 186838
2013-07-22 16:18:13 +00:00
Reid Kleckner 7b78d359fb Fix a crash bug in dumping options with groups
Option groups don't have prefixes.  Option dumping is basically dead
code unless there is something wrong with the option table, so this
isn't an important crasher.

llvm-svn: 185031
2013-06-26 22:43:37 +00:00
Chandler Carruth be81023d74 Resort the #include lines in include/... and lib/... with the
utils/sort_includes.py script.

Most of these are updating the new R600 target and fixing up a few
regressions that have creeped in since the last time I sorted the
includes.

llvm-svn: 171362
2013-01-02 10:22:59 +00:00
Michael J. Spencer 41ee041d4f Copy clang/Driver/<Option parsing stuff> to llvm.
llvm-svn: 169344
2012-12-05 00:29:32 +00:00