mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Add support for range expressions in TableGen foreach loops.
Like this: foreach i = 0-127 in ... Use braces for composite ranges: foreach i = {0-3,9-7} in ... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157432 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -402,14 +402,18 @@ which case the user must specify it explicitly.</dd>
|
||||
<dt><tt>list[4-7,17,2-3]</tt></dt>
|
||||
<dd>A slice of the 'list' list, including elements 4,5,6,7,17,2, and 3 from
|
||||
it. Elements may be included multiple times.</dd>
|
||||
<dt><tt>foreach <var> = <list> in { <body> }</tt></dt>
|
||||
<dt><tt>foreach <var> = <list> in <def></tt></dt>
|
||||
<dt><tt>foreach <var> = [ <list> ] in { <body> }</tt></dt>
|
||||
<dt><tt>foreach <var> = [ <list> ] in <def></tt></dt>
|
||||
<dd> Replicate <body> or <def>, replacing instances of
|
||||
<var> with each value in <list>. <var> is scoped at the
|
||||
level of the <tt>foreach</tt> loop and must not conflict with any other object
|
||||
introduced in <body> or <def>. Currently only <tt>def</tt>s are
|
||||
expanded within <body>.
|
||||
</dd>
|
||||
<dt><tt>foreach <var> = 0-15 in ...</tt></dt>
|
||||
<dt><tt>foreach <var> = {0-15,32-47} in ...</tt></dt>
|
||||
<dd>Loop over ranges of integers. The braces are required for multiple
|
||||
ranges.</dd>
|
||||
<dt><tt>(DEF a, b)</tt></dt>
|
||||
<dd>a dag value. The first element is required to be a record definition, the
|
||||
remaining elements in the list may be arbitrary other values, including nested
|
||||
|
Reference in New Issue
Block a user