summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/OptParserEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [TableGen] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-221-2/+2
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71807
* [TableGen] Add backend to generate command guide for tools using libOption.Jonas Devlieghere2019-11-221-70/+1
| | | | | | | | | | | | For lldb and dsymutil, the command guide is essentially a copy of its help output generated by libOption. Making sure the two stay in sync is tedious and error prone. Given that we already generate the help from a tablegen file, we might as well generate the RST as well. This adds a tablegen backend for generating Sphinx/RST command guides from the tablegen file. Differential revision: https://reviews.llvm.org/D70610
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [Bash-autocompletion] Add support for -std=Yuka Takahashi2017-08-291-2/+2
| | | | | | | | | | | | | | | Summary: Add support for autocompleting values of -std= by including LangStandards.def. This patch relies on D36782, and is using two-stage code generation. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36820 llvm-svn: 311971
* Revert "Revert r311552: [Bash-autocompletion] Add support for static ↵Yuka Takahashi2017-08-291-0/+26
| | | | | | | | | | | analyzer flags" This reverts commit 7c46b80c022e18d43c1fdafb117b0c409c5a6d1e. r311552 broke lld buildbot because I've changed OptionInfos type from ArrayRef to vector. However the bug is fixed, so I'll commit this again. llvm-svn: 311958
* Revert r311552: [Bash-autocompletion] Add support for static analyzer flagsRui Ueyama2017-08-231-26/+0
| | | | | | This reverts commit r311552 because it broke ubsan and asan bots. llvm-svn: 311557
* [Bash-autocompletion] Add support for static analyzer flagsYuka Takahashi2017-08-231-0/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: This is a patch for clang autocomplete feature. It will collect values which -analyzer-checker takes, which is defined in clang/StaticAnalyzer/Checkers/Checkers.inc, dynamically. First, from ValuesCode class in Options.td, TableGen will generate C++ code in Options.inc. Options.inc will be included in DriverOptions.cpp, and calls OptTable's addValues function. addValues function will add second argument to Option's Values class. Values contains string like "foo,bar,.." which is handed to Values class in OptTable. Reviewers: v.g.vassilev, teemperor, ruiu Subscribers: hiraditya, cfe-commits Differential Revision: https://reviews.llvm.org/D36782 llvm-svn: 311552
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-201-0/+10
| | | | | | | | | | | | 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
* [TableGen] Make Record::getValueAsString and getValueAsListOfStrings return ↵Craig Topper2017-05-311-16/+18
| | | | | | | | | | | | StringRefs instead of std::string Internally both these methods just return the result of getValue on either a StringInit or a CodeInit object. In both cases this returns a StringRef pointing to a string allocated in the BumpPtrAllocator so its not going anywhere. So we can just pass that StringRef along. This is a fairly naive patch that targets just the build failures caused by this change. There's additional work that can be done to avoid creating std::string at call sites that still think getValueAsString returns a std::string. I'll try to clean those up in future patches. Differential Revision: https://reviews.llvm.org/D33710 llvm-svn: 304325
* Fix some Clang-tidy modernize warnings, other minor fixes.Eugene Zelenko2015-11-041-10/+10
| | | | | | | | Fixed warnings are: modernize-use-override, modernize-use-nullptr and modernize-redundant-void-arg. Differential revision: http://reviews.llvm.org/D14312 llvm-svn: 252087
* Option: Propagate flags from groups to options in each groupReid Kleckner2014-07-121-11/+15
| | | | | | | This should make it easy to set a flag for a whole group of clang driver options. llvm-svn: 212865
* [cleanup] Re-sort all the includes with utils/sort_includes.py.Chandler Carruth2014-03-041-1/+1
| | | | llvm-svn: 202811
* Typo.Peter Collingbourne2013-10-201-1/+1
| | | | llvm-svn: 193043
* Provide basic type safety for array_pod_sort comparators.Benjamin Kramer2013-09-221-3/+3
| | | | | | | | This makes using array_pod_sort significantly safer. The implementation relies on function pointer casting but that should be safe as we're dealing with void* here. llvm-svn: 191175
* Option parsing: support case-insensitive option matching.Rui Ueyama2013-08-281-5/+10
| | | | | | Re-submitting r189416 with fix for Windows build on where strcasecmp is not defined. llvm-svn: 189501
* Revert "Option parsing: support case-insensitive option matching." as it ↵Rui Ueyama2013-08-281-14/+16
| | | | | | | | broke Windows buildbot. This reverts r189416. llvm-svn: 189424
* Option parsing: support case-insensitive option matching.Rui Ueyama2013-08-271-16/+14
| | | | | | | | | | | | | | Link.exe's command line options are case-insensitive. This patch adds a new attribute to OptTable to let the option parser to compare options, ignoring case. Command lines are generally case-insensitive on Windows. CL.exe is an exception. So this new attribute should be useful for other commands running on Windows. Differential Revision: http://llvm-reviews.chandlerc.com/D1485 llvm-svn: 189416
* Option parsing: remove non-SUPPORT_ALIASARGS fall-backHans Wennborg2013-07-311-14/+2
| | | | | | | | The clients of this code have been updated to all support AliasArgs. This depends on Clang r187538 and lld r187541. llvm-svn: 187546
* Option parsing: add support for alias arguments.Hans Wennborg2013-07-311-3/+30
| | | | | | | | | | | | | | | | | | 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
* Sort a few more #include lines in tools/... unittests/... and utils/...Chandler Carruth2013-01-021-3/+2
| | | | llvm-svn: 171363
* Copy clang/Driver/<Option parsing stuff> to llvm.Michael J. Spencer2012-12-051-0/+267
| | | | llvm-svn: 169344
* Remove the Clang tblgen backends from LLVM.Peter Collingbourne2011-10-061-194/+0
| | | | llvm-svn: 141293
* Move TableGen's parser and entry point into a libraryPeter Collingbourne2011-10-011-1/+1
| | | | | | This is the first step towards splitting LLVM and Clang's tblgen executables. llvm-svn: 140951
* Unconstify InitsDavid Greene2011-07-291-8/+8
| | | | | | Remove const qualifiers from Init references, per Chris' request. llvm-svn: 136531
* [AVX] Constify InitsDavid Greene2011-07-291-8/+8
| | | | | | | Make references to Inits const everywhere. This is the final step before making them unique. llvm-svn: 136485
* Revert r134921, 134917, 134908 and 134907. They're causing failuresEric Christopher2011-07-111-8/+8
| | | | | | in multiple buildbots. llvm-svn: 134936
* [AVX] Make Inits FoldableDavid Greene2011-07-111-8/+8
| | | | | | | | | | | | | | | | | | Manage Inits in a FoldingSet. This provides several benefits: - Memory for Inits is properly managed - Duplicate Inits are folded into Flyweights, saving memory - It enforces const-correctness, protecting against certain classes of bugs The above benefits allow Inits to be used in more contexts, which in turn provides more dynamism to TableGen. This enhanced capability will be used by the AVX code generator to a fold common patterns together. llvm-svn: 134907
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* tblgen/OptParser: Use EmitSourceFileHeader.Daniel Dunbar2010-01-041-20/+4
| | | | llvm-svn: 92521
* OptParser: Emit HelpText field for option groups.Daniel Dunbar2009-12-041-1/+12
| | | | llvm-svn: 90599
* TableGen/OptParser: When ordering options, make "sentinel" options appear beforeDaniel Dunbar2009-11-191-3/+10
| | | | | | everything else. llvm-svn: 89368
* TableGen: Add initial backend for clang Driver's option parsing.Daniel Dunbar2009-11-181-0/+192
llvm-svn: 89245
OpenPOWER on IntegriCloud