mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 08:46:37 +00:00
d23a41c153
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
16 lines
275 B
TableGen
16 lines
275 B
TableGen
// 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
|
|
|