[PATCH] D43559: TableGen: fix typeIsConvertibleTo for record types
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 02:45:45 PST 2018
nhaehnle created this revision.
nhaehnle added reviewers: arsenm, craig.topper, tra, MartinO.
Herald added a subscriber: wdng.
nhaehnle added a dependency: D43558: TableGen: Add strict assertions to sanity check earlier type checking.
nhaehnle added a dependent revision: D43560: TableGen: BitInit and VarBitInit are typed.
Only check whether the left-hand side type is a subclass (or equal to)
the right-hand side type.
This requires a further fix in handling !if expressions and in type
resolution.
Furthermore, reverse the order of superclasses so that resolveTypes will
find a least common ancestor at least in simple cases.
Add a test that used to be accepted without flagging the obvious type
error.
Change-Id: Ib366db1a4e6a079f1a0851e469b402cddae76714
Repository:
rL LLVM
https://reviews.llvm.org/D43559
Files:
lib/TableGen/Record.cpp
lib/TableGen/TGParser.cpp
test/TableGen/if-type.td
test/TableGen/if.td
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43559.135220.patch
Type: text/x-patch
Size: 3009 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180221/fa3acb73/attachment.bin>
More information about the llvm-commits
mailing list