mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-05-06 10:21:29 +02: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