Don't use TypeFunction::funcdecl as it is about to be removed

This commit is contained in:
Alexey Prokhin 2013-10-05 17:34:29 +04:00
parent b819975c84
commit 8fea7484fe
3 changed files with 6 additions and 28 deletions

View file

@ -166,28 +166,6 @@ IrTypePointer* IrTypePointer::get(Type* dt)
}
else
{
if (dt->nextOf()->ty == Tfunction)
{
TypeFunction* tf = static_cast<TypeFunction*>(dt->nextOf());
if (tf->funcdecl)
{
if (FuncLiteralDeclaration* fld =
tf->funcdecl->isFuncLiteralDeclaration())
{
if (fld->tok == TOKreserved)
{
// This is the type of a lambda that was inferred to be
// a function literal instead of a delegate, so set tok
// here in order to get correct types/mangling. Horrible
// hack, but DMD does the same thing in FuncExp::toElem
// and other random places.
fld->tok = TOKfunction;
fld->vthis = NULL;
}
}
}
}
elemType = i1ToI8(voidToI8(DtoType(dt->nextOf())));
// DtoType could have already created the same type, e.g. for