1 // RUN: llvm-tblgen %s | FileCheck %s
4 class Base<list<int> v> {
8 class Derived<list<int> v> : Base<!if(!empty(v),[0],v)>;
10 multiclass Multi<list<list<list<int>>> v> {
11 def ONE : Derived<!if(!empty(v),[]<int>,!if(!empty(!head(v)),[]<int>,v[0][0]))>;
12 def TWO : Derived<!if(!empty(v),[]<int>,!if(!empty(!tail(v)),!if(!empty(!head(v)),[]<int>,v[0][0]),v[1][0]))>;
15 defm Def : Multi<[[[]],[[1, 2, 3]]]>;
17 // CHECK: values = [0]
18 // CHECK: values = [1, 2, 3]