mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 13:53:14 +01:00
Apply wilsonk's patch to AddrExp::toConstElem for struct literals.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user