summaryrefslogtreecommitdiffstats
path: root/llvm/docs/TableGen
diff options
context:
space:
mode:
authorDaniel Sanders <daniel.sanders@imgtec.com>2014-05-07 10:13:19 +0000
committerDaniel Sanders <daniel.sanders@imgtec.com>2014-05-07 10:13:19 +0000
commit314e80e5f8d5d5233c062c489d41cef95a15e960 (patch)
tree9a21305ebde2a8b2a10c7203ab529e8d6525eb3f /llvm/docs/TableGen
parenta2125140aed42d35ecfea57e1d4998be91a998ff (diff)
downloadbcm5719-llvm-314e80e5f8d5d5233c062c489d41cef95a15e960.tar.gz
bcm5719-llvm-314e80e5f8d5d5233c062c489d41cef95a15e960.zip
[tablegen] Add !listconcat operator with the similar semantics as !strconcat
Summary: It concatenates two or more lists. In addition to the !strconcat semantics the lists must have the same element type. My overall aim is to make it easy to append to Instruction.Predicates rather than override it. This can be done by concatenating lists passed as arguments, or by concatenating lists passed in additional fields. Reviewers: dsanders Reviewed By: dsanders Subscribers: hfinkel, llvm-commits Differential Revision: http://reviews.llvm.org/D3506 llvm-svn: 208183
Diffstat (limited to 'llvm/docs/TableGen')
-rw-r--r--llvm/docs/TableGen/LangIntro.rst6
-rw-r--r--llvm/docs/TableGen/LangRef.rst2
2 files changed, 7 insertions, 1 deletions
diff --git a/llvm/docs/TableGen/LangIntro.rst b/llvm/docs/TableGen/LangIntro.rst
index 5b6094fa91f..3e74dffb00e 100644
--- a/llvm/docs/TableGen/LangIntro.rst
+++ b/llvm/docs/TableGen/LangIntro.rst
@@ -160,6 +160,12 @@ supported include:
remaining elements in the list may be arbitrary other values, including
nested ```dag``' values.
+``!listconcat(a, b, ...)``
+ A list value that is the result of concatenating the 'a' and 'b' lists.
+ The lists must have the same element type.
+ More than two arguments are accepted with the result being the concatenation
+ of all the lists given.
+
``!strconcat(a, b, ...)``
A string value that is the result of concatenating the 'a' and 'b' strings.
More than two arguments are accepted with the result being the concatenation
diff --git a/llvm/docs/TableGen/LangRef.rst b/llvm/docs/TableGen/LangRef.rst
index 781f789faaf..9b074be38dc 100644
--- a/llvm/docs/TableGen/LangRef.rst
+++ b/llvm/docs/TableGen/LangRef.rst
@@ -93,7 +93,7 @@ wide variety of meanings:
BangOperator: one of
:!eq !if !head !tail !con
:!add !shl !sra !srl
- :!cast !empty !subst !foreach !strconcat
+ :!cast !empty !subst !foreach !listconcat !strconcat
Syntax
======
OpenPOWER on IntegriCloud