OSDN Git Service

TableGen: Allow foreach in multiclass to depend on template args
authorNicolai Haehnle <nhaehnle@gmail.com>
Thu, 21 Jun 2018 13:35:44 +0000 (13:35 +0000)
committerNicolai Haehnle <nhaehnle@gmail.com>
Thu, 21 Jun 2018 13:35:44 +0000 (13:35 +0000)
commit9f2ffce7cdcae3aef9023384119b9dac6dafa931
treecff5cec95e926d9f7513e3e2c1d6cc097525d366
parentb36f9319d34ce8932208dcec59d33dbc7050d51d
TableGen: Allow foreach in multiclass to depend on template args

Summary:
This also allows inner foreach loops to have a list that depends on
the iteration variable of an outer foreach loop. The test cases show
some very simple examples of how this can be used.

This was perhaps the last remaining major non-orthogonality in the
TableGen frontend.

Change-Id: I79b92d41a5c0e7c03cc8af4000c5e1bda5ef464d

Reviewers: tra, simon_tatham, craig.topper, MartinO, arsenm

Subscribers: wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335221 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/TableGen/Record.h
lib/TableGen/Record.cpp
lib/TableGen/TGParser.cpp
lib/TableGen/TGParser.h
test/TableGen/NestedForeach.td
test/TableGen/foreach-multiclass.td