summaryrefslogtreecommitdiffstats
path: root/llvm/lib/TableGen/Main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Tablegen: Remove the error for duplicate include files.River Riddle2019-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This error was originally added a while(7 years) ago when including multiple files was basically always an error. Tablegen now has preprocessor support, which allows for building nice c/c++ style include guards. With the current error being reported, we unfortunately need to double guard when including files: * In user of MyFile.td #ifndef MYFILE_TD include MyFile.td #endif * In MyFile.td #ifndef MYFILE_TD #define MYFILE_TD ... #endif Differential Revision: https://reviews.llvm.org/D70410
* Reland r349624: Let TableGen write output only if it changed, instead of ↵Nico Weber2019-10-031-8/+29
| | | | | | | | | | | doing so in cmake Move the write-if-changed logic behind a flag and don't pass it with the MSVC generator. msbuild doesn't have a restat optimization, so not doing write-if-change there doesn't have a cost, and it should fix whatever causes PR43385. llvm-svn: 373664
* Revert rL349624 : Let TableGen write output only if it changed, instead of ↵Simon Pilgrim2019-10-011-24/+8
| | | | | | | | | | doing so in cmake, attempt 2 Differential Revision: https://reviews.llvm.org/D55842 ----------------- As discussed on PR43385 this is causing Visual Studio msbuilds to perpetually rebuild all tablegen generated files llvm-svn: 373338
* [TableGen] Skip CRLF conversion when writing outputReid Kleckner2019-09-111-2/+2
| | | | | | | | | Doing the CRLF translation while writing the file defeats our optimization to not update the file if it hasn't changed. Fixes PR43271. llvm-svn: 371683
* Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song2019-08-051-2/+2
| | | | | | F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
* 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
* Let TableGen write output only if it changed, instead of doing so in cmake, ↵Nico Weber2018-12-191-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | attempt 2 This relands r330742: """ Let TableGen write output only if it changed, instead of doing so in cmake. Removes one subprocess and one temp file from the build for each tablegen invocation. No intended behavior change. """ In particular, if you see rebuilds after this change that you didn't see before this change, that's unintended and it's fine to revert this change again (but let me know). r330742 got reverted because some people reported that llvm-tblgen ran on every build after it. This could happen if the depfile output got deleted without deleting the main .inc output. To fix, make TableGen always write the depfile, but keep writing the main .inc output only if it has changed. This matches what we did in cmake before. Differential Revision: https://reviews.llvm.org/D55842 llvm-svn: 349624
* [TableGen] Preprocessing supportVyacheslav Zakharin2018-11-271-1/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D54926 llvm-svn: 347686
* Reverted r347092 due to the following build fails:Vyacheslav Zakharin2018-11-171-5/+1
| | | | | | | http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/8662 http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/26263 llvm-svn: 347129
* Preprocessing support in tablegen.Vyacheslav Zakharin2018-11-161-1/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D53840 llvm-svn: 347092
* Revert r330742: Let TableGen write output only if it changed, instead of ↵Chandler Carruth2018-05-071-16/+5
| | | | | | | | | | | | | | | | | | | | doing so in cmake. This change causes us to re-run tablegen for every single target on every single build. This is much, much worse than the problem being fixed AFAICT. On my system, it makes a clean rebuild of `llc` with nothing changed go from .5s to over 8s. On systems with less parallelism, slower file systems, or high process startup overhead this will be even more extreme. The only way I see this could be a win is in clean builds where we churn the filesystem. But I think incremental rebuild is more important, and so if we want to re-instate this, it needs to be done in a way that doesn't trigger constant re-runs of tablegen. llvm-svn: 331702
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-011-1/+1
| | | | | | | | | | | | | | | | We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46290 llvm-svn: 331272
* Let TableGen write output only if it changed, instead of doing so in cmake.Nico Weber2018-04-241-5/+16
| | | | | | | | | | | Removes one subprocess and one temp file from the build for each tablegen invocation. No intended behavior change. https://reviews.llvm.org/D45899 llvm-svn: 330742
* Avoid int to string conversion in Twine or raw_ostream contexts.Benjamin Kramer2017-12-281-1/+1
| | | | | | Some output changes from uppercase hex to lowercase hex, no other functionality change intended. llvm-svn: 321526
* [Support] Rename tool_output_file to ToolOutputFile, NFCReid Kleckner2017-09-231-2/+2
| | | | | | | This class isn't similar to anything from the STL, so it shouldn't use the STL naming conventions. llvm-svn: 314050
* [TableGen] Centralize/Unify error handling.Davide Italiano2016-12-051-23/+21
| | | | llvm-svn: 288724
* [TableGen] Include header for each cpp file first. NFCCraig Topper2015-05-261-1/+1
| | | | llvm-svn: 238180
* [TableGen] Remove unneeded namespace around a function. Just put llvm:: on ↵Craig Topper2015-05-261-5/+1
| | | | | | the definition since it's already declared in a header file. llvm-svn: 238178
* [TableGen] Use 'static' instead of an anonymous namespace.Craig Topper2015-05-261-18/+16
| | | | llvm-svn: 238177
* Use range-based for loops. NFCCraig Topper2014-12-111-5/+2
| | | | llvm-svn: 224005
* Modernize raw_fd_ostream's constructor a bit.Rafael Espindola2014-08-251-10/+10
| | | | | | | | | | Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
* Explicitly pass ownership of the MemoryBuffer to AddNewSourceBuffer using ↵David Blaikie2014-08-211-2/+1
| | | | | | std::unique_ptr llvm-svn: 216223
* Update the MemoryBuffer API to use ErrorOr.Rafael Espindola2014-07-061-5/+6
| | | | llvm-svn: 212405
* Remove 'using std::errro_code' from lib.Rafael Espindola2014-06-131-3/+1
| | | | llvm-svn: 210871
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* Remove system_error.h.Rafael Espindola2014-06-121-1/+1
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. llvm-svn: 210803
* raw_ostream: Forward declare OpenFlags and include FileSystem.h only where ↵Benjamin Kramer2014-04-291-0/+1
| | | | | | necessary. llvm-svn: 207593
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-2/+1
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-1/+1
| | | | llvm-svn: 202957
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-241-2/+2
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
* Don't make F_None the default.Rafael Espindola2014-02-241-2/+2
| | | | | | This will make it easier to switch the default to being binary files. llvm-svn: 202042
* keep only the StringRef version of getFileOrSTDIN.Rafael Espindola2013-06-251-1/+1
| | | | llvm-svn: 184826
* Make sure TableGen exits with an error code after printing errors.Jakob Stoklund Olesen2013-03-201-2/+5
| | | | | | | | | | This makes it possible to report multiple errors in one invocation. There are already calls to PrintError in CodeGenDAGPatterns.cpp which previously would not cause TableGen to fail. <rdar://problem/13463339> llvm-svn: 177573
* tblgen: Diagnose duplicate includes.Sean Silva2013-02-071-4/+4
| | | | | | | | | | | | | | | A double inclusion will pretty much always be an error in TableGen, so there's no point going on just to die with "def already defined" or whatnot. I'm not too thrilled about the "public: ... private: ..." to expose the DependenciesMapTy, but I really didn't see a better way to keep that type centralized. It's a smell that indicates that some refactoring is needed to make this code more loosely coupled. This should avoid all bugs of the same nature as PR15189. llvm-svn: 174582
* Remove exception handling usage from tblgen.Joerg Sonnenberger2012-10-251-49/+39
| | | | | | | | | | | Most places can use PrintFatalError as the unwinding mechanism was not used for anything other than printing the error. The single exception was CodeGenDAGPatterns.cpp, where intermediate errors during type resolution were ignored to simplify incremental platform development. This use is replaced by an error flag in TreePattern and bailout earlier in various places if it is set. llvm-svn: 166712
* tblgen: Rename handleDependencies -> createDependencyFileSean Silva2012-10-091-2/+2
| | | | llvm-svn: 165544
* tblgen: Move dependency file output to a separate function.Sean Silva2012-10-091-21/+31
| | | | | | This keeps it out of the main flow of TableGenMain. llvm-svn: 165542
* tblgen: Remove last traces of old TableGenMain API.Sean Silva2012-10-031-20/+1
| | | | llvm-svn: 165168
* tblgen: Put new TableGenMain API in place.Sean Silva2012-10-031-0/+19
| | | | | | | | In order to avoid rev-lock with Clang when moving to the new API, also preserve the current API temporarily and insert a shim to implement the new API in terms of the old. llvm-svn: 165165
* Fix 80 columns.Michael J. Spencer2012-06-011-3/+6
| | | | llvm-svn: 157788
* Revert r141079: tblgen: add preprocessor as a separate modeChe-Liang Chiou2011-10-081-23/+0
| | | | llvm-svn: 141492
* tblgen: add preprocessor as a separate modeChe-Liang Chiou2011-10-041-0/+23
| | | | | | | | | | | | | | This patch adds a preprocessor that can expand nested for-loops for saving some copy-n-paste in *.td files. The preprocessor is not yet integrated with TGParser, and so it has no direct effect on *.td inputs. However, you may preprocess an td input (and only preprocess it). To test the proprecessor, type: tblgen -E -o $@ $< llvm-svn: 141079
* Move TableGen's parser and entry point into a libraryPeter Collingbourne2011-10-011-0/+124
This is the first step towards splitting LLVM and Clang's tblgen executables. llvm-svn: 140951
OpenPOWER on IntegriCloud