Implement !cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71794 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Greene
2009-05-14 21:22:49 +00:00
parent d418c1b768
commit e6c27de069
7 changed files with 248 additions and 157 deletions

View File

@@ -398,11 +398,12 @@ supported include:</p>
<dt><tt>!strconcat(a, b)</tt></dt>
<dd>A string value that is the result of concatenating the 'a' and 'b'
strings.</dd>
<dt><tt>!cast<type>(a)</tt></dt>
<dd>A symbol of type <em>type</em> obtained by looking up the string 'a' in
the symbol table. If the type of 'a' does not match <em>type</em>, TableGen
aborts with an error. </dd>
<dt><tt>!nameconcat&lt;type&gt;(a, b)</tt></dt>
<dd>A value that is the result of concatenating the 'a' and 'b'
strings and looking up the resulting name in the symbol table. The symbol type
determines the type of the resulting value. If the symbol is not found
or the symbol type does not match 'type,' TableGen emits an error and aborts.</dd>
<dd>Shorthand for !cast<type>(!strconcat(a, b))</dd>
</dl>
<p>Note that all of the values have rules specifying how they convert to values