Emit TypeNodes.def with tblgen.
authorJohn McCall <rjmccall@apple.com>
Tue, 1 Oct 2019 23:13:03 +0000 (23:13 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 1 Oct 2019 23:13:03 +0000 (23:13 +0000)
commita82d2fe94427f3122ecf94549b5f7f4c57b7b913
tree640e5db65e07c7edcdca9550abf6b1ee7ce5220f
parentc45f8d49897f1068676b8ba8e204d789fc6ceaea
Emit TypeNodes.def with tblgen.

The primary goal here is to make the type node hierarchy available to
other tblgen backends, although it should also make it easier to generate
more selective x-macros in the future.

Because tblgen doesn't seem to allow backends to preserve the source
order of defs, this is not NFC because it significantly re-orders IDs.
I've fixed the one (fortunately obvious) place where we relied on
the old order.  Unfortunately, I wasn't able to share code with the
existing AST-node x-macro generators because the x-macro schema we use
for types is different in a number of ways.  The main loss is that
subclasses aren't ordered together, which doesn't seem important for
types because the hierarchy is generally very shallow with little
clustering.

llvm-svn: 373407
clang/include/clang/AST/CMakeLists.txt
clang/include/clang/AST/Type.h
clang/include/clang/AST/TypeNodes.def [deleted file]
clang/include/clang/Basic/TypeNodes.td [new file with mode: 0644]
clang/utils/TableGen/CMakeLists.txt
clang/utils/TableGen/ClangTypeNodesEmitter.cpp [new file with mode: 0644]
clang/utils/TableGen/TableGen.cpp
clang/utils/TableGen/TableGenBackends.h