2013-08-23 04:46:05 +08:00
|
|
|
// RUN: llvm-tblgen %s | FileCheck %s
|
2013-11-10 22:26:08 +08:00
|
|
|
// XFAIL: vg_leak
|
2013-08-23 04:46:05 +08:00
|
|
|
|
|
|
|
// CHECK: WorldHelloCC
|
|
|
|
// CHECK-NOT: WorldHelloCC
|
2009-05-06 00:28:25 +08: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-03 03:35:33 +08: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">;
|
|
|
|
|