summaryrefslogtreecommitdiff
path: root/test/TableGen
diff options
context:
space:
mode:
Diffstat (limited to 'test/TableGen')
-rw-r--r--test/TableGen/MultiClassDefName.td15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/TableGen/MultiClassDefName.td b/test/TableGen/MultiClassDefName.td
index d3c6de7e84..69b951d378 100644
--- a/test/TableGen/MultiClassDefName.td
+++ b/test/TableGen/MultiClassDefName.td
@@ -14,3 +14,18 @@ multiclass Names<string n, string m> {
}
defm Hello : Names<"hello", "world">;
+
+// Ensure that the same anonymous name is used as the prefix for all defs in an
+// anonymous multiclass.
+
+class Outer<C i> {
+ C Inner = i;
+}
+
+multiclass MC<string name> {
+ def hi : C<name>;
+ def there : Outer<!cast<C>(!strconcat(NAME, "hi"))>;
+}
+
+defm : MC<"foo">;
+