mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
6786d5e183
Use !cast<string>() to compare other types of objects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92754 91177308-0d34-0410-b5e6-96231b3b80d8
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">;
|