aboutsummaryrefslogtreecommitdiff
path: root/test/TableGen
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@FreeBSD.org>2010-01-15 15:37:28 +0000
committerRoman Divacky <rdivacky@FreeBSD.org>2010-01-15 15:37:28 +0000
commit829000e035f46f2a227a5466e4e427a2f3cc00a9 (patch)
treebe5a687969f682edded4aa6f13594ffd9aa9030e /test/TableGen
parent1e7804dbd25b8dbf534c850355d70ad215206f4b (diff)
Notes
Diffstat (limited to 'test/TableGen')
-rw-r--r--test/TableGen/eq.td13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/TableGen/eq.td b/test/TableGen/eq.td
new file mode 100644
index 000000000000..8ba6d7ec8335
--- /dev/null
+++ b/test/TableGen/eq.td
@@ -0,0 +1,13 @@
+// RUN: tblgen %s | FileCheck %s
+// CHECK: Value = 0
+// CHECK: Value = 1
+
+class Base<int V> {
+ int Value = V;
+}
+
+class Derived<string Truth> :
+ Base<!if(!eq(Truth, "true"), 1, 0)>;
+
+def TRUE : Derived<"true">;
+def FALSE : Derived<"false">;