summaryrefslogtreecommitdiff
path: root/test/TableGen/Dag.td
diff options
context:
space:
mode:
Diffstat (limited to 'test/TableGen/Dag.td')
-rw-r--r--test/TableGen/Dag.td35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/TableGen/Dag.td b/test/TableGen/Dag.td
new file mode 100644
index 0000000000..8b406a59d3
--- /dev/null
+++ b/test/TableGen/Dag.td
@@ -0,0 +1,35 @@
+// RUN: tblgen %s | FileCheck %s
+// XFAIL: vg_leak
+
+//===----------------------------------------------------------------------===//
+// Substitution of an int.
+def X1;
+
+class C1<int N> {
+ dag d = (X1 N);
+}
+
+def VAL1 : C1<13>;
+
+// CHECK: def VAL1 {
+// CHECK-NEXT: dag d = (X1 13)
+
+
+//===----------------------------------------------------------------------===//
+// Substitution of a DAG.
+def X2;
+
+class yclass;
+def Y2 : yclass;
+
+class C2<yclass N> {
+ dag d = (X2 N);
+ dag e = (N X2);
+}
+
+def VAL2 : C2<Y2>;
+
+// CHECK: def VAL2 {
+// CHECK-NEXT: dag d = (X2 Y2)
+// CHECK-NEXT: dag e = (Y2 X2)
+