[PATCH] D95309: [TableGen] Fix anonymous record self-reference in foreach and multiclass
Jyun-Yan You via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 24 02:17:43 PST 2021
jyyou.tw created this revision.
Herald added a subscriber: hiraditya.
jyyou.tw requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
If we instantiate self-referenced anonymous records in foreach and
multiclass, the NAME value will point to incorrect record.
It's because anonymous name is resolved too early.
This patch adds AnonymousNameInit to represent an anonymous record
name. When instantiating an anonymous record, it will update the
referred name.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95309
Files:
llvm/include/llvm/TableGen/Record.h
llvm/lib/TableGen/Record.cpp
llvm/lib/TableGen/TGParser.cpp
llvm/test/TableGen/self-reference.td
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95309.318818.patch
Type: text/x-patch
Size: 4569 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210124/9767508f/attachment.bin>
More information about the llvm-commits
mailing list