From 6786d5e18387465d6106eaef0b7923526ef0bc10 Mon Sep 17 00:00:00 2001 From: David Greene Date: Tue, 5 Jan 2010 19:11:42 +0000 Subject: Add an !eq() operator to TableGen. It operates on strings only. Use !cast() to compare other types of objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92754 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/TableGen/eq.td | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/TableGen/eq.td (limited to 'test/TableGen') diff --git a/test/TableGen/eq.td b/test/TableGen/eq.td new file mode 100644 index 0000000..8ba6d7e --- /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 Value = V; +} + +class Derived : + Base; + +def TRUE : Derived<"true">; +def FALSE : Derived<"false">; -- cgit v1.1