mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Implement a !foreach operator analogous to GNU make's $(foreach).
Use it on dags and lists like this: class decls { string name; } def Decls : decls; class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71803 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -407,6 +407,10 @@ aborts with an error. </dd>
|
||||
<dt><tt>!subst(a, b, c)</tt></dt>
|
||||
<dd>If 'a' and 'b' are of string type or are symbol references, substitute
|
||||
'b' for 'a' in 'c.' This operation is analogous to $(subst) in GNU make.</dd>
|
||||
<dt><tt>!foreach(a, b, c)</tt></dt>
|
||||
<dd>For each member 'b' of dag or list 'a' apply operator 'c.' 'b' is a
|
||||
dummy variable that should be declared as a member variable of an instantiated
|
||||
class. This operation is analogous to $(foreach) in GNU make.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Note that all of the values have rules specifying how they convert to values
|
||||
|
Reference in New Issue
Block a user