diff options
Diffstat (limited to 'test/TableGen')
-rw-r--r-- | test/TableGen/eq.td | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/TableGen/eq.td b/test/TableGen/eq.td new file mode 100644 index 00000000000..8ba6d7ec833 --- /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">; |