1 // RUN: not llvm-tblgen %s 2>&1 | FileCheck %s
4 // This test verifies that tablegen does fail if it can't resolve an unresolved
5 // !cast() during processing top-level defm.
12 multiclass M0<string s> {
13 // This should work fine.
14 def _m00 : B<!cast<A>(s)>;
15 // CHECK: error: Undefined reference to record: 'd1_r1_no_such_record'
16 def _m01: B<!cast<A>(s#"_no_such_record")>;
19 multiclass M1<string s> {
21 // It would be nice if we could refer to _r1's name without having to pass it
22 // explicitly via 's'.
23 // XCHECK-DAG: note: instantiated from multiclass
24 defm _m1: M0<s # "_r1">;
28 // CHECK: note: instantiated from multiclass
29 // CHECK: defm _m1: M0
30 // CHECK: note: instantiated from multiclass