projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add an addition operator to TableGen
[oota-llvm.git]
/
test
/
TableGen
/
math.td
1
// RUN: llvm-tblgen %s | FileCheck %s
2
3
class Int<int value> {
4
int Value = value;
5
}
6
7
def v1024 : Int<1024>;
8
// CHECK: Value = 1024
9
10
def v1025 : Int<!add(v1024.Value, 1)>;
11
// CHECK: Value = 1025
12
13
def v2048 : Int<!add(v1024.Value, v1024.Value)>;
14
// CHECK: Value = 2048
15