aboutsummaryrefslogtreecommitdiff
path: root/test/TableGen
diff options
context:
space:
mode:
Diffstat (limited to 'test/TableGen')
-rw-r--r--test/TableGen/ifbit.td11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/TableGen/ifbit.td b/test/TableGen/ifbit.td
new file mode 100644
index 0000000000..3b0349e19b
--- /dev/null
+++ b/test/TableGen/ifbit.td
@@ -0,0 +1,11 @@
+// RUN: tblgen %s | FileCheck %s
+// XFAIL: vg_leak
+// CHECK: a = 6
+// CHECK: a = 5
+
+class A<bit b = 1> {
+ int a = !if(b, 5, 6);
+}
+
+def X : A<0>;
+def Y : A;