]> granicus.if.org Git - llvm/commit
TableGen: Allow lists to be concatenated through '#'
authorJaved Absar <javed.absar@arm.com>
Tue, 5 Mar 2019 17:16:07 +0000 (17:16 +0000)
committerJaved Absar <javed.absar@arm.com>
Tue, 5 Mar 2019 17:16:07 +0000 (17:16 +0000)
commit60e3f9f86c7ae0d7838ae3c30976596454b899b7
treeaab4e554bf02f33949578bf3d255abfd6396cbc3
parente46d0f6df47d6c564c108f5e206d0ab02c89678e
TableGen:  Allow lists to be concatenated through '#'

Currently one can concatenate strings using hash(#),
but not lists, although that would be a natural thing to do.

This patch allows one to write something like:
def : A<!listconcat([1,2], [3,4])>;
simply as :
def : A<[1,2] # [3,4]>;

This was missing feature was highlighted by Nicolai
at FOSDEM talk.

Reviewed by: nhaehnle, hfinkel

Differential Revision: https://reviews.llvm.org/D58895

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355414 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/TableGen/Record.h
lib/TableGen/Record.cpp
lib/TableGen/TGParser.cpp
test/TableGen/listpaste.td [new file with mode: 0644]