mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-08-05 22:10:04 +02:00
[svn r342] Fix DMD bug 2206.
Implement mixin declarations in LLVMDC.
This commit is contained in:
25
dmd/mangle.c
25
dmd/mangle.c
@@ -221,6 +221,31 @@ char *TemplateInstance::mangle()
|
||||
}
|
||||
|
||||
|
||||
char *TemplateMixin::mangle()
|
||||
{
|
||||
OutBuffer buf;
|
||||
char *id;
|
||||
|
||||
#if 0
|
||||
printf("TemplateMixin::mangle() %s", toChars());
|
||||
if (parent)
|
||||
printf(" parent = %s %s", parent->kind(), parent->toChars());
|
||||
printf("\n");
|
||||
#endif
|
||||
id = ident ? ident->toChars() : toChars();
|
||||
if (parent)
|
||||
{
|
||||
char *p = parent->mangle();
|
||||
if (p[0] == '_' && p[1] == 'D')
|
||||
p += 2;
|
||||
buf.writestring(p);
|
||||
}
|
||||
buf.printf("%"PRIuSIZE"%s", strlen(id), id);
|
||||
id = buf.toChars();
|
||||
buf.data = NULL;
|
||||
//printf("TemplateMixin::mangle() %s = %s\n", toChars(), id);
|
||||
return id;
|
||||
}
|
||||
|
||||
char *Dsymbol::mangle()
|
||||
{
|
||||
|
||||
@@ -309,6 +309,7 @@ struct TemplateMixin : TemplateInstance
|
||||
int oneMember(Dsymbol **ps);
|
||||
int hasPointers();
|
||||
char *toChars();
|
||||
char *mangle();
|
||||
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
||||
|
||||
void toObjFile(); // compile to .obj file
|
||||
|
||||
Reference in New Issue
Block a user