diff options
author | David Greene <greened@obbligato.org> | 2009-04-22 20:18:10 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-04-22 20:18:10 +0000 |
commit | c7cafcd815519b06318629b424abe746437e1389 (patch) | |
tree | cb53439bdde7bbb4e94db441f65f2b420ca48052 /docs/TableGenFundamentals.html | |
parent | d7b2f7ffcecee2809cf75d71374319dc0e73a71b (diff) |
Implement !nameconcat to concatenate strings and look up the resulting
name in the symbol table, returning an object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/TableGenFundamentals.html')
-rw-r--r-- | docs/TableGenFundamentals.html | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/TableGenFundamentals.html b/docs/TableGenFundamentals.html index e9915cb029..42839176cb 100644 --- a/docs/TableGenFundamentals.html +++ b/docs/TableGenFundamentals.html @@ -398,6 +398,11 @@ 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>!nameconcat(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, + TableGen emits an error and aborts.</dd> </dl> <p>Note that all of the values have rules specifying how they convert to values @@ -627,8 +632,9 @@ Here is an example TableGen fragment that shows this idea: <p>The name of the resultant definitions has the multidef fragment names appended to them, so this defines <tt>ADD_rr</tt>, <tt>ADD_ri</tt>, - <tt>SUB_rr</tt>, etc. Using a multiclass this way is exactly equivalent to - instantiating the classes multiple times yourself, e.g. by writing:</p> + <tt>SUB_rr</tt>, etc. Using a multiclass this way is exactly + equivalent to instantiating the classes multiple times yourself, + e.g. by writing:</p> <div class="doc_code"> <pre> |