diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2013-04-08 18:41:23 +0000 |
| commit | 4a16efa3e43e35f0cc9efe3a67f620f0017c3d36 (patch) | |
| tree | 06099edc18d30894081a822b756f117cbe0b8207 /test/TableGen/math.td | |
| parent | 482e7bddf617ae804dc47133cb07eb4aa81e45de (diff) | |
Notes
Diffstat (limited to 'test/TableGen/math.td')
| -rw-r--r-- | test/TableGen/math.td | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/TableGen/math.td b/test/TableGen/math.td new file mode 100644 index 000000000000..bde267a652dc --- /dev/null +++ b/test/TableGen/math.td @@ -0,0 +1,18 @@ +// RUN: llvm-tblgen %s | FileCheck %s + +class Int<int value> { + int Value = value; +} + +def v1024 : Int<1024>; +// CHECK: def v1024 +// CHECK: Value = 1024 + +def v1025 : Int<!add(v1024.Value, 1)>; +// CHECK: def v1025 +// CHECK: Value = 1025 + +def v2048 : Int<!add(v1024.Value, v1024.Value)>; +// CHECK: def v2048 +// CHECK: Value = 2048 + |
