[PATCH] D62212: TableGen: Handle nontrivial foreach range bounds

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 21 11:19:40 PDT 2019


arsenm created this revision.
arsenm added reviewers: craig.topper, nhaehnle, hfinkel, dsanders.
Herald added a subscriber: wdng.

This allows using anything that isn't a literal integer as the bounds
for a foreach. Some of the diagnostics aren't perfect, but nobody ever
accused tablegen of having good errors. For example, the existing
wording suggests a bitrange is valid, but as far as I can tell this
has never worked.

Fixes bug 41958.


https://reviews.llvm.org/D62212

Files:
  lib/TableGen/TGParser.cpp
  lib/TableGen/TGParser.h
  test/TableGen/foreach-range-parse-errors0.td
  test/TableGen/foreach-range-parse-errors1.td
  test/TableGen/foreach-range-parse-errors2.td
  test/TableGen/foreach-range-parse-errors3.td
  test/TableGen/foreach-range-parse-errors4.td
  test/TableGen/foreach-range-parse-errors5.td
  test/TableGen/foreach-variable-range.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62212.200556.patch
Type: text/x-patch
Size: 11296 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190521/463c52c6/attachment.bin>


More information about the llvm-commits mailing list