llvm-6502/test/TableGen/eq.td

14 lines
242 B
TableGen
Raw Normal View History

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