[TableGen] Fix instantiating multiclass in foreach
authorJ-Y You <jyyou.tw@gmail.com>
Fri, 29 Jan 2021 15:24:30 +0000 (10:24 -0500)
committerPaul C. Anagnostopoulos <paul@windfall.com>
Fri, 29 Jan 2021 15:25:33 +0000 (10:25 -0500)
commit5046c5be8459a9631eeb149337776dcbde0e2a0b
treed8c4f108111ee5bbc97361572b6fdf43f49306c5
parentd087d805acb664e885e9c31a916f6cfa5dbc2186
[TableGen] Fix instantiating multiclass in foreach

If multiclass argument comes from loop varaible and argument is record type,
it will not recognize the type. This patch ensures that loop variables are
resolved correctly.

Differential Revision: https://reviews.llvm.org/D95308
llvm/lib/TableGen/TGParser.cpp
llvm/test/TableGen/foreach-multiclass.td