diff options
author | David Greene <greened@obbligato.org> | 2009-05-14 21:54:42 +0000 |
---|---|---|
committer | David Greene <greened@obbligato.org> | 2009-05-14 21:54:42 +0000 |
commit | 4afc509b7ffe2c4ea234dfd7af5105feb21685d9 (patch) | |
tree | e095d38947400d6afe3a6885a236a45e8cc3955a /docs/TableGenFundamentals.html | |
parent | 94555c28462aab05157b41d78505d5753bd97dad (diff) |
Implement a !subst operation simmilar to $(subst) in GNU make to do
def/var/string substitution on generic pattern templates. For example:
def Type;
def v4f32 : Type;
def TYPE : Type;
class GenType<Type t> {
let type = !(subst TYPE, v4f32, t);
}
def TheType : GenType<TYPE>;
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/TableGenFundamentals.html')
-rw-r--r-- | docs/TableGenFundamentals.html | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/TableGenFundamentals.html b/docs/TableGenFundamentals.html index 48fdd2a201..0186453f36 100644 --- a/docs/TableGenFundamentals.html +++ b/docs/TableGenFundamentals.html @@ -404,6 +404,9 @@ the symbol table. If the type of 'a' does not match <em>type</em>, TableGen aborts with an error. </dd> <dt><tt>!nameconcat<type>(a, b)</tt></dt> <dd>Shorthand for !cast<type>(!strconcat(a, b))</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> </dl> <p>Note that all of the values have rules specifying how they convert to values |