Additionally, allow more than two operands to !con, !add, !and, !or
in the same way as is already allowed for !listconcat and !strconcat.
Change-Id: I9659411f554201b90cd8ed7c7e004d381a66fa93
Paths
| Differential D44112
TableGen: Type-check BinOps ClosedPublic Authored by nhaehnle on Mar 5 2018, 12:20 PM.
Details Summary Additionally, allow more than two operands to !con, !add, !and, !or Change-Id: I9659411f554201b90cd8ed7c7e004d381a66fa93
Diff Detail
Event TimelineComment Actions This change should come with an update to the docs. One thing jumped at me -- we have three different variants of concatenation -- !con, !listconcat and !strconcat (along with '#'). Do we need all of them? I think we could get by with one, which would glue together items of the same kind.
Comment Actions
True, I'm adding that.
I agree. The nicest option would be for # to cover everything, though it is a bit special in that it does automatic casts to string. Then again, it's probably good enough to just not do those conversions if one of the LHS or RHS are dags or lists.
Comment Actions Update the docs, relax operands to !add, !and, !or in the same This revision is now accepted and ready to land.Mar 9 2018, 9:48 AM Closed by commit rL327494: TableGen: Type-check BinOps (authored by nha). · Explain WhyMar 14 2018, 4:03 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 138322 llvm/trunk/docs/TableGen/LangIntro.rst
llvm/trunk/lib/TableGen/TGParser.cpp
llvm/trunk/test/TableGen/Paste.td
llvm/trunk/test/TableGen/arithmetic.td
llvm/trunk/test/TableGen/dag-functional.td
llvm/trunk/test/TableGen/listconcat.td
llvm/trunk/test/TableGen/math.td
|