TableGen: Explicitly test some cases of self-references and !cast errors
authorNicolai Haehnle <nhaehnle@gmail.com>
Mon, 19 Mar 2018 14:14:10 +0000 (14:14 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Mon, 19 Mar 2018 14:14:10 +0000 (14:14 +0000)
commit18f1998a00492bb70de37aaab4441ea9cea306f5
tree129b81185e416407127b988792168eb47c30b4aa
parent335c70f55ed2101ef7e7411a33b6af7eb2a4384b
TableGen: Explicitly test some cases of self-references and !cast errors

Summary:
These are cases of self-references that exist today in practice. Let's
add tests for them to avoid regressions.

The self-references in PPCInstrInfo.td can be expressed in a simpler
way. Allowing this type of self-reference while at the same time
consistently doing late-resolve even for self-references is problematic
because there are references to fields that aren't in any class. Since
there's no need for this type of self-reference anyway, let's just
remove it.

Change-Id: I914e0b3e1ae7adae33855fac409b536879bc3f62

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: nemanjai, wdng, kbarton, llvm-commits

Differential Revision: https://reviews.llvm.org/D44474

llvm-svn: 327848
llvm/lib/TableGen/Record.cpp
llvm/lib/Target/PowerPC/PPCInstrInfo.td
llvm/test/TableGen/cast-typeerror.td [new file with mode: 0644]
llvm/test/TableGen/self-reference-typeerror.td [new file with mode: 0644]
llvm/test/TableGen/self-reference.td [new file with mode: 0644]