]> granicus.if.org Git - clang/commit
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)
commit739c4b366afc16f550024e11addb2f00b48df8fd
tree7f4176759aa1fbd3cb259f7e94f56d8ca433f5d6
parent458ec23df30bc4a66ce6794c5780d0bc7699bd27
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373407 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/CMakeLists.txt
include/clang/AST/Type.h
include/clang/AST/TypeNodes.def [deleted file]
include/clang/Basic/TypeNodes.td [new file with mode: 0644]
utils/TableGen/CMakeLists.txt
utils/TableGen/ClangTypeNodesEmitter.cpp [new file with mode: 0644]
utils/TableGen/TableGen.cpp
utils/TableGen/TableGenBackends.h