llvm-project/llvm/lib/TableGen
River Riddle 7480efd6f0 [Tablegen] Collect all global state into one managed static
Tablegen uses copious amounts of global state for uniquing various records.
This was fine under the original vision where tablegen was a tool, and not a
library, but there are various usages of tablegen that want to use it as a library.
One concrete example is that downstream we have a kythe indexer for tablegen
constructs that allows for IDEs to serve go-to-definition/references/and more.
We currently (kind of hackily) keep the tablegen parts in a shared library that
gets loaded/unloaded.

This revision starts to remedy this by globbing all of the static state into a
managed static so that they can at least be unloaded with llvm_shutdown.
A better solution would be to feed in a context variable (much like how
the IR in LLVM/MLIR do), but that is a more invasive change that can come later.

Differential Revision: https://reviews.llvm.org/D108934
2021-11-09 01:24:54 +00:00
..
CMakeLists.txt
DetailedRecordsBackend.cpp DetailedRecordsBackend.cpp - printSectionHeading - avoid std::string creation/copies. 2021-06-13 16:49:40 +01:00
Error.cpp [TableGen] Add support for the 'assert' statement in class definitions. 2021-03-29 09:20:29 -04:00
JSONBackend.cpp
Main.cpp [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
Record.cpp [Tablegen] Collect all global state into one managed static 2021-11-09 01:24:54 +00:00
SetTheory.cpp [TableGen] Use range-based for loops (NFC) 2021-03-06 15:52:55 -08:00
StringMatcher.cpp [TableGen] Use range-based for loops (NFC) 2021-03-06 15:52:55 -08:00
TGLexer.cpp [TableGen] Make the NUL character invalid in .td files 2021-05-13 10:17:45 -04:00
TGLexer.h [TableGen] Add the !find bang operator 2021-04-28 09:51:00 -04:00
TGParser.cpp [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
TGParser.h [TableGen] Emit a warning for unused template args 2021-11-03 11:55:07 +00:00
TableGenBackend.cpp
TableGenBackendSkeleton.cpp