[PATCH] D94822: [TableGen] Improve algorithm for inheriting class template arguments and fields
Paul C. Anagnostopoulos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 13:29:35 PST 2021
Paul-C-Anagnostopoulos created this revision.
Paul-C-Anagnostopoulos added reviewers: lattner, dblaikie, craig.topper, madhur13490.
Herald added a subscriber: hiraditya.
Paul-C-Anagnostopoulos requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This revision improves the algorithm that processes a class's template arguments when a record inherits from the class.
Currently the algorithm copies all the template argument defaults into the new record's field list, replaces the values that were specified in the class invocation, copies the values into the resolver map, and then deletes the template arguments from the field list. This new algorithm copies the template arguments directly into the resolver map and then replaces the default values with the specified ones.
This revision relies on a previous revision that made it so field definitions can be tagged as template arguments. It paves the way for a future revision that will handle assert statements in class definitions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94822
Files:
llvm/include/llvm/TableGen/Record.h
llvm/lib/TableGen/Record.cpp
llvm/lib/TableGen/TGParser.cpp
llvm/test/TableGen/self-reference-typeerror.td
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94822.317059.patch
Type: text/x-patch
Size: 7518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210115/c5f9a1de/attachment.bin>
More information about the llvm-commits
mailing list