Recommit "rL366894: [yaml2obj] - Allow custom fields for the SHT_UNDEF sections."
[llvm-complete.git] / test / TableGen / cast-multiclass.td
blob7c8ed5f1f048708b0400c5439409d999a548fb40
1 // RUN: llvm-tblgen %s | FileCheck %s
3 class AClass<bit C> {
4   bit Cond = C;
7 def A0: AClass<0>;
8 def A1: AClass<1>;
10 class BoolToList<bit Value> {
11   list<int> ret = !if(Value, [1]<int>, []<int>);
14 multiclass P<string AStr> {
15   foreach i = BoolToList<!cast<AClass>(AStr).Cond>.ret in
16     def SubDef;
19 // CHECK-NOT: def XSubDef
20 defm X : P<"A0">;
22 // CHECK: def YSubDef
23 defm Y : P<"A1">;