1 // RUN: llvm-tblgen %s | FileCheck %s 2 // XFAIL: vg_leak 3 4 // CHECK: --- Defs --- 5 6 // CHECK: def X { 7 // CHECK: foo Y = anonymous_0; 8 // CHECK: } 9 10 // CHECK: def ZD { 11 // CHECK: foo Z = anonymous_1; 12 // CHECK: } 13 14 // CHECK: def anonymous_0 { 15 // CHECK: int THEVAL = 1; 16 // CHECK: } 17 18 // CHECK: def anonymous_1 { 19 // CHECK: int THEVAL = 42; 20 // CHECK: } 21 22 class foo<int X> { int THEVAL = X; } 23 def foo_imp : foo<1>; 24 25 def x { 26 foo Y = foo_imp; // This works. 27 } 28 29 def X { 30 foo Y = foo<1>; // This should work too, synthesizing a new foo<1>. 31 } 32 33 class Z<int X> { 34 foo Z = foo<X>; 35 } 36 37 def ZD : Z<42>; 38