This is an archive of the discontinued LLVM Phabricator instance.

TableGen: Handle nontrivial foreach range bounds
ClosedPublic

Authored by arsenm on May 21 2019, 11:19 AM.

Details

Summary

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.

Diff Detail

Event Timeline

arsenm created this revision.May 21 2019, 11:19 AM
hfinkel accepted this revision.May 22 2019, 2:07 PM

LGTM

lib/TableGen/TGParser.cpp
2495

Unnecessary white space addition?

This revision is now accepted and ready to land.May 22 2019, 2:07 PM
arsenm closed this revision.May 22 2019, 2:25 PM
arsenm marked an inline comment as done.

r361434