summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Option/Option.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Option parsing: properly handle flag aliases for joined options (PR23394)Hans Wennborg2015-05-041-0/+5
| | | | | | | | | A joined option always needs to have an argument, even if it's an empty one. Clang would previously assert when trying to use --extra-warnings, which is a flag alias for -W, which is a joined option. llvm-svn: 236434
* Remove explicit no-op dtor in favor of the implicit dtor so as not to ↵David Blaikie2015-03-031-3/+0
| | | | | | disable/deprecate the copy operations. llvm-svn: 231113
* Fix PR17239 by changing the semantics of the RemainingArgsClass Option kindReid Kleckner2014-08-221-4/+8
| | | | | | | | | | | | | | | | | | | | | | | This patch contains the LLVM side of the fix of PR17239. This bug that happens because the /link (clang-cl.exe argument) is marked as "consume all remaining arguments". However, when inside a response file, /link should only consume all remaining arguments inside the response file where it is located, not the entire command line after expansion. My patch will change the semantics of the RemainingArgsClass kind to always consume only until the end of the response file when the option originally came from a response file. There are only two options in this class: dash dash (--) and /link. Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D4899 Patch by Rafael Auler! llvm-svn: 216280
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-151-10/+10
| | | | | | instead of comparing to nullptr. llvm-svn: 206252
* Options: Add new option kind that consumes remaining argumentsHans Wennborg2013-08-131-0/+11
| | | | | | | | | | | | | | | | This adds KIND_REMAINING_ARGS, a class of options that consume all remaining arguments on the command line. This will be used to support /link in clang-cl, which is used to forward all remaining arguments to the linker. It also allows us to remove the hard-coded handling of "--", allowing clients (clang and lld) to implement that functionality themselves with this new option class. Differential Revision: http://llvm-reviews.chandlerc.com/D1387 llvm-svn: 188314
* Option parsing: add support for alias arguments.Hans Wennborg2013-07-311-2/+20
| | | | | | | | | | | | | | | | | | 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
* Silence gcc warning.Richard Trieu2013-07-221-1/+1
| | | | llvm-svn: 186879
* Option parsing: allow aliases in groupsHans Wennborg2013-07-221-6/+4
| | | | | | | | | 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
* Fix a crash bug in dumping options with groupsReid Kleckner2013-06-261-4/+6
| | | | | | | | 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
* Resort the #include lines in include/... and lib/... with theChandler Carruth2013-01-021-3/+1
| | | | | | | | | | 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
* Copy clang/Driver/<Option parsing stuff> to llvm.Michael J. Spencer2012-12-051-0/+204
llvm-svn: 169344
OpenPOWER on IntegriCloud