[PATCH] Fix error in tablegen when second operand of an !if is an empty list.
Matt Arsenault
Matthew.Arsenault at amd.com
Thu Feb 27 16:10:28 PST 2014
On 02/27/2014 02:22 PM, Duncan P. N. Exon Smith wrote:
> On Feb 27, 2014, at 10:03 AM, Matt Arsenault <Matthew.Arsenault at amd.com> wrote:
>
>> Ping
>>
>> http://llvm-reviews.chandlerc.com/D2724
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> Thanks for the testcase (and the ping). Seems correct to me, but I haven’t
> touched TableGen before.
>
> Anyone else care to comment?
>
> I did notice an asymmetry:
>
> ===================================================================
> --- /dev/null
> +++ test/TableGen/if-empty-list-arg.td
> @@ -0,0 +1,6 @@
> +// RUN: llvm-tblgen %s
> +// XFAIL: vg_leak
> +
> +class C<bit cond> {
> + list<int> X = !if(cond, [1, 2, 3], []);
> +}
>
> From the code it looks like reversing the arguments would still fail:
>
> list<int> X = !if(cond, [], [1, 2, 3]);
>
> Not sure if that matters, though.
I can add another case to test both ways
More information about the llvm-commits
mailing list