From a9c6c5d39bd577a25801c39ca38b38ea4f68ce45 Mon Sep 17 00:00:00 2001
From: David Greene
Date: Wed, 22 Apr 2009 20:18:10 +0000
Subject: Implement !nameconcat to concatenate strings and look up the
resulting name in the symbol table, returning an object.
llvm-svn: 69822
---
llvm/docs/TableGenFundamentals.html | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
(limited to 'llvm/docs')
diff --git a/llvm/docs/TableGenFundamentals.html b/llvm/docs/TableGenFundamentals.html
index e9915cb0294..42839176cbf 100644
--- a/llvm/docs/TableGenFundamentals.html
+++ b/llvm/docs/TableGenFundamentals.html
@@ -398,6 +398,11 @@ supported include:
!strconcat(a, b)
A string value that is the result of concatenating the 'a' and 'b'
strings.
+!nameconcat(a, b)
+ 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.
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:
The name of the resultant definitions has the multidef fragment names
appended to them, so this defines ADD_rr, ADD_ri,
- SUB_rr, etc. Using a multiclass this way is exactly equivalent to
- instantiating the classes multiple times yourself, e.g. by writing:
+ SUB_rr, etc. Using a multiclass this way is exactly
+ equivalent to instantiating the classes multiple times yourself,
+ e.g. by writing: