[PATCH] D44475: TableGen: Check the dynamic type of !cast<Rec>(string)
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 14 08:23:25 PDT 2018
nhaehnle created this revision.
nhaehnle added reviewers: arsenm, craig.topper, tra, MartinO.
Herald added subscribers: javed.absar, wdng.
The docs already claim that this happens, but so far it hasn't. As a
consequence, existing TableGen files get this wrong a lot, but luckily
the fixes are all reasonably straightforward.
To make this work with all the existing forms of self-references (since
the true type of a record is only built up over time), the lookup of
self-references in !cast is delayed until the final resolving step.
Change-Id: If5923a72a252ba2fbc81a889d59775df0ef31164
Repository:
rL LLVM
https://reviews.llvm.org/D44475
Files:
include/llvm/TableGen/Record.h
include/llvm/Target/TargetSelectionDAG.td
lib/TableGen/Record.cpp
lib/Target/AArch64/AArch64InstrFormats.td
lib/Target/AMDGPU/SMInstructions.td
lib/Target/SystemZ/SystemZOperands.td
test/TableGen/cast-typeerror.td
test/TableGen/self-reference.td
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44475.138366.patch
Type: text/x-patch
Size: 27350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180314/28eb6aea/attachment.bin>
More information about the llvm-commits
mailing list