summaryrefslogtreecommitdiff
path: root/test/TableGen/math.td
blob: 1f3a500f08974f1325e80965a7d0cfd8dc03b78b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: llvm-tblgen %s | FileCheck %s

class Int<int value> {
  int Value = value;
}

def v1024   : Int<1024>;
// CHECK: Value = 1024

def v1025   : Int<!add(v1024.Value, 1)>;
// CHECK: Value = 1025

def v2048   : Int<!add(v1024.Value, v1024.Value)>;
// CHECK: Value = 2048