[PATCH] D58895: [TableGen] Allow lists to be concatenated through '#'

Javed Absar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 01:42:13 PST 2019


javedabsar created this revision.
javedabsar added reviewers: nhaehnle, simon_tatham.

Currently one can concatenate strings using hash(#), but not lists,  although that would be a natural thing to do. 
This was highlighted by  Nicolai at a FOSDEM talk as well.
This patch allows one to write something like:

  def : A<!listconcat([1,2], [3,4])>;

simply as :

  def : A<[1,2] # [3,4]>;


https://reviews.llvm.org/D58895

Files:
  include/llvm/TableGen/Record.h
  lib/TableGen/Record.cpp
  lib/TableGen/TGParser.cpp
  test/TableGen/listpaste.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58895.189126.patch
Type: text/x-patch
Size: 3885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190304/4cd1e9c3/attachment.bin>


More information about the llvm-commits mailing list