summaryrefslogtreecommitdiffstats
path: root/llvm/test/TableGen/ClassInstanceValue.td
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/TableGen/ClassInstanceValue.td')
-rw-r--r--llvm/test/TableGen/ClassInstanceValue.td19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/TableGen/ClassInstanceValue.td b/llvm/test/TableGen/ClassInstanceValue.td
new file mode 100644
index 00000000000..b6c4c93cb09
--- /dev/null
+++ b/llvm/test/TableGen/ClassInstanceValue.td
@@ -0,0 +1,19 @@
+// RUN: llvm-tblgen %s | FileCheck %s
+// XFAIL: vg_leak
+
+class Struct<int i> {
+ int I = !shl(i, 1);
+ int J = !shl(I, 1);
+}
+
+class Class<Struct s> {
+ int Class_J = s.J;
+}
+
+multiclass MultiClass<int i> {
+ def Def : Class<Struct<i>>;
+// CHECK: Class_J = 8
+// CHECK-NOT: Class_J = !shl(I, 1)
+}
+
+defm Defm : MultiClass<2>;
OpenPOWER on IntegriCloud