2013-08-22 20:46:05 +00:00
|
|
|
// RUN: llvm-tblgen %s | FileCheck %s
|
2013-11-10 14:26:08 +00:00
|
|
|
// XFAIL: vg_leak
|
2013-08-22 20:46:05 +00:00
|
|
|
|
|
|
|
// CHECK: WorldHelloCC
|
|
|
|
// CHECK-NOT: WorldHelloCC
|
2009-05-05 16:28:25 +00:00
|
|
|
|
|
|
|
class C<string n> {
|
|
|
|
string name = n;
|
|
|
|
}
|
|
|
|
|
|
|
|
multiclass Names<string n, string m> {
|
|
|
|
def CC : C<n>;
|
|
|
|
def World#NAME#CC : C<m>;
|
|
|
|
}
|
|
|
|
|
|
|
|
defm Hello : Names<"hello", "world">;
|
2014-01-02 19:35:33 +00:00
|
|
|
|
|
|
|
// 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">;
|
|
|
|
|