Change the { } expression in tablegen to accept sized binary literals which are not...
authorPete Cooper <peter_cooper@apple.com>
Thu, 7 Aug 2014 05:47:07 +0000 (05:47 +0000)
committerPete Cooper <peter_cooper@apple.com>
Thu, 7 Aug 2014 05:47:07 +0000 (05:47 +0000)
commit64a334da36da748426904701bfc56c3bf5d064fe
tree234b17dbb68c961fb8d521408438c1b7b97d5bbe
parent2093e2cb43800707d1cc3156ee753282db51fb7c
Change the { } expression in tablegen to accept sized binary literals which are not just 0 and 1.

It also allows nested { } expressions, as now that they are sized, we can merge pull bits from the nested value.

In the current behaviour, everything in { } must have been convertible to a single bit.
However, now that binary literals are sized, its useful to be able to initialize a range of bits.

So, for example, its now possible to do

bits<8> x = { 0, 1, { 0b1001 }, 0, 0b0 }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215086 91177308-0d34-0410-b5e6-96231b3b80d8
lib/TableGen/TGParser.cpp
test/TableGen/BitsInit.td