mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-15 12:23:13 +01:00
First merge of 2.064 beta.
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb. Doesn't build Phobos yet.
This commit is contained in:
committed by
Kai Nacke
parent
c400d180d2
commit
cb341586e3
@@ -129,16 +129,24 @@ void cpp_mangle_name(OutBuffer *buf, CppMangleState *cms, Dsymbol *s)
|
||||
buf->writeByte('N');
|
||||
|
||||
FuncDeclaration *fd = s->isFuncDeclaration();
|
||||
if (!fd)
|
||||
VarDeclaration *vd = s->isVarDeclaration();
|
||||
if (fd && fd->type->isConst())
|
||||
{
|
||||
s->error("C++ static variables not supported");
|
||||
}
|
||||
else if (fd->type->isConst())
|
||||
buf->writeByte('K');
|
||||
|
||||
prefix_name(buf, cms, p);
|
||||
source_name(buf, s);
|
||||
|
||||
}
|
||||
if (vd && !(vd->storage_class & (STCextern | STCgshared)))
|
||||
{
|
||||
s->error("C++ static non- __gshared non-extern variables not supported");
|
||||
}
|
||||
if (vd || fd)
|
||||
{
|
||||
prefix_name(buf, cms, p);
|
||||
source_name(buf, s);
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(0);
|
||||
}
|
||||
buf->writeByte('E');
|
||||
}
|
||||
else
|
||||
@@ -337,7 +345,7 @@ void TypeFunction::toCppMangle(OutBuffer *buf, CppMangleState *cms)
|
||||
TypeFunctions for non-static member functions, and non-static
|
||||
member functions of different classes.
|
||||
*/
|
||||
if (!cms->substitute(buf, this))
|
||||
if (!cms->exist(this))
|
||||
{
|
||||
buf->writeByte('F');
|
||||
if (linkage == LINKc)
|
||||
@@ -345,7 +353,10 @@ void TypeFunction::toCppMangle(OutBuffer *buf, CppMangleState *cms)
|
||||
next->toCppMangle(buf, cms);
|
||||
Parameter::argsCppMangle(buf, cms, parameters, varargs);
|
||||
buf->writeByte('E');
|
||||
cms->store(this);
|
||||
}
|
||||
else
|
||||
cms->substitute(buf, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -417,7 +428,7 @@ static int argsCppMangleDg(void *ctx, size_t n, Parameter *arg)
|
||||
{
|
||||
ArgsCppMangleCtx *p = (ArgsCppMangleCtx *)ctx;
|
||||
|
||||
Type *t = arg->type;
|
||||
Type *t = arg->type->merge2();
|
||||
if (arg->storageClass & (STCout | STCref))
|
||||
t = t->referenceTo();
|
||||
else if (arg->storageClass & STClazy)
|
||||
|
||||
Reference in New Issue
Block a user