[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / test / TableGen / AnonDefinitionOnDemand.td
bloba02671e70eb6b6c671c504af42d01a11ed847014
1 // RUN: llvm-tblgen %s | FileCheck %s
2 // XFAIL: vg_leak
4 // CHECK: --- Defs ---
6 // CHECK: def X {
7 // CHECK:   foo Y = anonymous_0;
8 // CHECK: }
10 // CHECK: def ZD {
11 // CHECK:   foo Z = anonymous_1;
12 // CHECK: }
14 // CHECK: def anonymous_0 {
15 // CHECK:   int THEVAL = 1;
16 // CHECK: }
18 // CHECK: def anonymous_1 {
19 // CHECK:   int THEVAL = 42;
20 // CHECK: }
22 class foo<int X> { int THEVAL = X; }
23 def foo_imp : foo<1>;
25 def x {
26   foo Y = foo_imp;    // This works.
29 def X {
30   foo Y = foo<1>;     // This should work too, synthesizing a new foo<1>.
33 class Z<int X> {
34   foo Z = foo<X>;
37 def ZD : Z<42>;