aboutsummaryrefslogtreecommitdiffstats
path: root/test/TableGen/eq.td
blob: f8daf880b9edef8305c4e11e8f5b88ae0b330854 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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">;