1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/TableGen/math.td
Hal Finkel d47af40308 Improve the !add TableGen test case.
Suggested by Sean Silva.

llvm-svn: 173481
2013-01-25 20:29:25 +00:00

19 lines
335 B
TableGen

// 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