From 98ed3c7273cbccb69ed322fe2223f3bccd5b7850 Mon Sep 17 00:00:00 2001 From: David Greene Date: Thu, 14 May 2009 21:54:42 +0000 Subject: 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 { let type = !(subst TYPE, v4f32, t); } def TheType : GenType; llvm-svn: 71801 --- llvm/docs/TableGenFundamentals.html | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/docs/TableGenFundamentals.html') diff --git a/llvm/docs/TableGenFundamentals.html b/llvm/docs/TableGenFundamentals.html index 48fdd2a2018..0186453f368 100644 --- a/llvm/docs/TableGenFundamentals.html +++ b/llvm/docs/TableGenFundamentals.html @@ -404,6 +404,9 @@ the symbol table. If the type of 'a' does not match type, TableGen aborts with an error.
!nameconcat<type>(a, b)
Shorthand for !cast(!strconcat(a, b))
+
!subst(a, b, c)
+
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.

Note that all of the values have rules specifying how they convert to values -- cgit v1.2.3