Fix error in tablegen when either operand of !if is an empty list.
!if([Something], []) would error with "No type for list".
llvm-svn: 210572
diff --git a/llvm/test/TableGen/if-empty-list-arg.td b/llvm/test/TableGen/if-empty-list-arg.td
new file mode 100644
index 0000000..39edf58
--- /dev/null
+++ b/llvm/test/TableGen/if-empty-list-arg.td
@@ -0,0 +1,7 @@
+// RUN: llvm-tblgen %s
+// XFAIL: vg_leak
+
+class C<bit cond> {
+ list<int> X = !if(cond, [1, 2, 3], []);
+ list<int> Y = !if(cond, [], [4, 5, 6]);
+}