llvm.org GIT mirror llvm / release_34 test / TableGen / eq.td
release_34

Tree @release_34 (Download .tar.gz)

eq.td @release_34

5d5c062
a22657f
6786d5e
 
 
 
 
 
 
 
 
 
 
 
// RUN: llvm-tblgen %s | FileCheck %s
// XFAIL: vg_leak
// 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">;