summaryrefslogtreecommitdiffstats
path: root/llvm/docs/TableGen/LangRef.rst
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/docs/TableGen/LangRef.rst')
-rw-r--r--llvm/docs/TableGen/LangRef.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/docs/TableGen/LangRef.rst b/llvm/docs/TableGen/LangRef.rst
index 89996f35822..702b40c9011 100644
--- a/llvm/docs/TableGen/LangRef.rst
+++ b/llvm/docs/TableGen/LangRef.rst
@@ -360,13 +360,17 @@ precede any ``class``'s that appear.
-----------
.. productionlist::
- Foreach: "foreach" `Declaration` "in" "{" `Object`* "}"
- :| "foreach" `Declaration` "in" `Object`
+ Foreach: "foreach" `ForeachDeclaration` "in" "{" `Object`* "}"
+ :| "foreach" `ForeachDeclaration` "in" `Object`
+ ForeachDeclaration: ID "=" ( "{" `RangeList` "}" | `RangePiece` | `Value` )
The value assigned to the variable in the declaration is iterated over and
the object or object list is reevaluated with the variable set at each
iterated value.
+Note that the productions involving RangeList and RangePiece have precedence
+over the more generic value parsing based on the first token.
+
Top-Level ``let``
-----------------
OpenPOWER on IntegriCloud