summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Option/Option.cpp
Commit message (Collapse)AuthorAgeFilesLines
* IWYU for llvm-config.h in llvm, additions.Nico Weber2018-04-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See r331124 for how I made a list of files missing the include. I then ran this Python script: for f in open('filelist.txt'): f = f.strip() fl = open(f).readlines() found = False for i in xrange(len(fl)): p = '#include "llvm/' if not fl[i].startswith(p): continue if fl[i][len(p):] > 'Config': fl.insert(i, '#include "llvm/Config/llvm-config.h"\n') found = True break if not found: print 'not found', f else: open(f, 'w').write(''.join(fl)) and then looked through everything with `svn diff | diffstat -l | xargs -n 1000 gvim -p` and tried to fix include ordering and whatnot. No intended behavior change. llvm-svn: 331184
* Reverting r315590; it did not include changes for llvm-tblgen, which is ↵Aaron Ballman2017-10-151-1/+1
| | | | | | | | causing link errors for several people. Error LNK2019 unresolved external symbol "public: void __cdecl `anonymous namespace'::MatchableInfo::dump(void)const " (?dump@MatchableInfo@?A0xf4f1c304@@QEBAXXZ) referenced in function "public: void __cdecl `anonymous namespace'::AsmMatcherEmitter::run(class llvm::raw_ostream &)" (?run@AsmMatcherEmitter@?A0xf4f1c304@@QEAAXAEAVraw_ostream@llvm@@@Z) llvm-tblgen D:\llvm\2017\utils\TableGen\AsmMatcherEmitter.obj 1 llvm-svn: 315854
* [dump] Remove NDEBUG from test to enable dump methods [NFC]Don Hinton2017-10-121-1/+1
| | | | | | | | | | | | | | | Summary: Add LLVM_FORCE_ENABLE_DUMP cmake option, and use it along with LLVM_ENABLE_ASSERTIONS to set LLVM_ENABLE_DUMP. Remove NDEBUG and only use LLVM_ENABLE_DUMP to enable dump methods. Move definition of LLVM_ENABLE_DUMP from config.h to llvm-config.h so it'll be picked up by public headers. Differential Revision: https://reviews.llvm.org/D38406 llvm-svn: 315590
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-201-0/+1
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and ↵Eugene Zelenko2017-06-161-4/+6
| | | | | | Include What You Use warnings; other minor fixes (NFC). llvm-svn: 305537
* Cleanup dump() functions.Matthias Braun2017-01-281-0/+2
| | | | | | | | | | | | | | | | | | We had various variants of defining dump() functions in LLVM. Normalize them (this should just consistently implement the things discussed in http://lists.llvm.org/pipermail/cfe-dev/2014-January/034323.html For reference: - Public headers should just declare the dump() method but not use LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) - The definition of a dump method should look like this: #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void MyClass::dump() { // print stuff to dbgs()... } #endif llvm-svn: 293359
* Option parser: class for consuming a joined arg in addition to all remaining ↵Hans Wennborg2016-04-151-0/+14
| | | | | | args llvm-svn: 266394
* Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith ↵Yaron Keren2016-01-291-1/+1
| | | | | | | | r259192 post commit comment. clang part in r259232, this is the LLVM part of the patch. llvm-svn: 259240
* Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs().Eric Christopher2015-12-181-14/+17
| | | | | | | | Also add print() functions. Patch by Justin Lebar! llvm-svn: 256010
* 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