From d23a41c153712b929bd84f5e713bda5db5d6e66d Mon Sep 17 00:00:00 2001 From: Hal Finkel Date: Fri, 25 Jan 2013 14:49:08 +0000 Subject: Add an addition operator to TableGen This adds an !add(a, b) operator to tablegen; this will be used to cleanup the PPC register definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173445 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/TableGen/math.td | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/TableGen/math.td (limited to 'test/TableGen') diff --git a/test/TableGen/math.td b/test/TableGen/math.td new file mode 100644 index 0000000000..1f3a500f08 --- /dev/null +++ b/test/TableGen/math.td @@ -0,0 +1,15 @@ +// RUN: llvm-tblgen %s | FileCheck %s + +class Int { + int Value = value; +} + +def v1024 : Int<1024>; +// CHECK: Value = 1024 + +def v1025 : Int; +// CHECK: Value = 1025 + +def v2048 : Int; +// CHECK: Value = 2048 + -- cgit v1.2.3