[PATCH] D60367: [TableGen] Introduce !listsplat 'binary' operator

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 14:39:59 PDT 2019


lebedev.ri marked an inline comment as done.
lebedev.ri added a comment.

In D60367#1460454 <https://reviews.llvm.org/D60367#1460454>, @javed.absar wrote:

> Thanks for this. Its good you show a use-case but probably the use case can be a separate commit.


I absolutely can split that up during commit.



================
Comment at: lib/TableGen/TGParser.cpp:1154
+              Error(OpLoc,
+                    Twine("expected output type to be a list, got type '") +
+                        ItemType->getAsString() + "'");
----------------
javed.absar wrote:
> 'output type' ? Would that be a bit confusing to user. I can't think of a better option though since the context (assignment?) won't be known.
IIRC this is checking for
```
class X<int a, int b> {
  str x = !listsplat(a, b);
}
def DX00 : X<0, 0>;
```
We know the type `!listsplat` is supposed to return since we know the LHS of the assignment.
I'm not sure how to spell this out best.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60367/new/

https://reviews.llvm.org/D60367





More information about the llvm-commits mailing list