mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-22 07:32:48 +00:00
14 lines
242 B
TableGen
14 lines
242 B
TableGen
|
// RUN: tblgen %s | FileCheck %s
|
||
|
// CHECK: Value = 0
|
||
|
// CHECK: Value = 1
|
||
|
|
||
|
class Base<int V> {
|
||
|
int Value = V;
|
||
|
}
|
||
|
|
||
|
class Derived<string Truth> :
|
||
|
Base<!if(!eq(Truth, "true"), 1, 0)>;
|
||
|
|
||
|
def TRUE : Derived<"true">;
|
||
|
def FALSE : Derived<"false">;
|