OSDN Git Service

TableGen: Fix type deduction for !foreach
authorNicolai Haehnle <nhaehnle@gmail.com>
Thu, 22 Feb 2018 15:26:35 +0000 (15:26 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Thu, 22 Feb 2018 15:26:35 +0000 (15:26 +0000)
commitb5681f5c717eedef2be9bb9f668267767db7157f
tree6ad53a96c1749651957f2c3711c1dd07045dfdaa
parent869ea800defc2db6e4e9bd0cdda5f47f8dc2a866
TableGen: Fix type deduction for !foreach

Summary:
In the case of !foreach(id, input-list, transform) where the type of
input-list is list<A> and the type of transform is B, we now correctly
deduce list<B> as the type of the !foreach.

Change-Id: Ia19dd65eecc5991dd648280ba6a15f6a20fd61de

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D43555

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@325797 91177308-0d34-0410-b5e6-96231b3b80d8
lib/TableGen/TGParser.cpp
test/TableGen/foreach.td