Apply wilsonk's patch to AddrExp::toConstElem for struct literals.

This commit is contained in:
Christian Kamm
2008-12-17 20:40:27 +01:00
parent d3de204732
commit cb0201960c

View File

@@ -988,6 +988,12 @@ LLConstant* AddrExp::toConstElem(IRState* p)
assert(type->toBasetype()->ty == Tpointer);
return DtoBitCast(gep, DtoType(type));
}
else if (e1->op == TOKstructliteral)
{
StructLiteralExp* slexp = (StructLiteralExp*)e1;
LLConstant* lit = slexp->toConstElem(p);
return lit;
}
// not yet supported
else
{