summaryrefslogtreecommitdiffstats
path: root/llvm/test/TableGen/MultiClass-def-fail.td
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/TableGen/MultiClass-def-fail.td')
-rw-r--r--llvm/test/TableGen/MultiClass-def-fail.td10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/TableGen/MultiClass-def-fail.td b/llvm/test/TableGen/MultiClass-def-fail.td
new file mode 100644
index 00000000000..ed37e5cd71c
--- /dev/null
+++ b/llvm/test/TableGen/MultiClass-def-fail.td
@@ -0,0 +1,10 @@
+// RUN: not llvm-tblgen %s 2>&1 | FileCheck %s
+// XFAIL: vg_leak
+
+// This test checks that using def instead of defm gives a meaningful error
+multiclass M2 {
+ def X;
+}
+
+// CHECK: error: Couldn't find class 'M2'. Use 'defm' if you meant to use multiclass 'M2'
+def rec1 : M2;
OpenPOWER on IntegriCloud