[PATCH] D43559: TableGen: fix typeIsConvertibleTo for record types

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 09:37:32 PST 2018


tra added inline comments.


================
Comment at: test/TableGen/if.td:76-85
+// Check that !if with operands of different subtypes can initialize a
+// supertype variable.
+class E<int dummy> {}
+class E1<int dummy> : E<dummy> {}
+class E2<int dummy> : E<dummy> {}
+
+class EX<int cc, E1 b, E2 c> {
----------------
I think there should be some defs and CHECKs to demonstrate and verify what we expect to generate.

It's actually not obvious for me whether a particular instance of EX is going to end up with.
I think it will contain only the subset of fields in E from E1/E2.  Or, perhaps, I'm wrong and it will contain full set of records from either E1 or E2, depending on cc.  Either way it would be good to illustrate expected behavior.


Repository:
  rL LLVM

https://reviews.llvm.org/D43559





More information about the llvm-commits mailing list