• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: llvm-tblgen %s | FileCheck %s
2
3class AClass<bit C> {
4  bit Cond = C;
5}
6
7def A0: AClass<0>;
8def A1: AClass<1>;
9
10class BoolToList<bit Value> {
11  list<int> ret = !if(Value, [1]<int>, []<int>);
12}
13
14multiclass P<string AStr> {
15  foreach i = BoolToList<!cast<AClass>(AStr).Cond>.ret in
16    def SubDef;
17}
18
19// CHECK-NOT: def XSubDef
20defm X : P<"A0">;
21
22// CHECK: def YSubDef
23defm Y : P<"A1">;
24