Mercurial > hg > CbC > CbC_llvm
diff test/TableGen/eq.td @ 3:9ad51c7bc036
1st commit. remove git dir and add all files.
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 15 May 2013 06:43:32 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/TableGen/eq.td Wed May 15 06:43:32 2013 +0900 @@ -0,0 +1,13 @@ +// RUN: llvm-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">;