aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Option/Option.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-04-15Option parser: class for consuming a joined arg in addition to all remaining ↵Hans Wennborg1-0/+14
args llvm-svn: 266394
2016-01-29Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren1-1/+1
r259192 post commit comment. clang part in r259232, this is the LLVM part of the patch. llvm-svn: 259240
2015-12-18Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs().Eric Christopher1-14/+17
Also add print() functions. Patch by Justin Lebar! llvm-svn: 256010
2015-05-04Option parsing: properly handle flag aliases for joined options (PR23394)Hans Wennborg1-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
2015-03-03Remove explicit no-op dtor in favor of the implicit dtor so as not to ↵David Blaikie1-3/+0
disable/deprecate the copy operations. llvm-svn: 231113
2014-08-22Fix PR17239 by changing the semantics of the RemainingArgsClass Option kindReid Kleckner1-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
2014-04-15[C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper1-10/+10
instead of comparing to nullptr. llvm-svn: 206252
2013-08-13Options: Add new option kind that consumes remaining argumentsHans Wennborg1-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
2013-07-31Option parsing: add support for alias arguments.Hans Wennborg1-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
2013-07-22Silence gcc warning.Richard Trieu1-1/+1
llvm-svn: 186879
2013-07-22Option parsing: allow aliases in groupsHans Wennborg1-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
2013-06-26Fix a crash bug in dumping options with groupsReid Kleckner1-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
2013-01-02Resort the #include lines in include/... and lib/... with theChandler Carruth1-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
2012-12-05Copy clang/Driver/<Option parsing stuff> to llvm.Michael J. Spencer1-0/+204
llvm-svn: 169344