mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
19324a5b81
Use !cast<string>() to compare other types of objects. llvm-svn: 92754
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">;
|