d: Factor aggregate_initializer_decl to set the sinit for aggregate declarations.
commit99d6d3d92f24c249314e0509f1ffa68f8450495e
authorIain Buclaw <ibuclaw@gdcproject.org>
Mon, 26 Jul 2021 16:40:35 +0000 (26 18:40 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 30 Jul 2021 10:51:35 +0000 (30 12:51 +0200)
tree01720a8940e9dc5ae82dd9452e6b111a8bf79f9b
parent3b52a1086c1358a7694ebe0c7610058c48e93b22
d: Factor aggregate_initializer_decl to set the sinit for aggregate declarations.

The self-hosted implementation of the D front-end changes the type of
`sinit' to a void pointer, which requires an explicit cast to `tree'.

gcc/d/ChangeLog:

* decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't use sinit
for declaration directly.
(DeclVisitor::visit (ClassDeclaration *)): Likewise.
(aggregate_initializer_decl): Likewise.  Set sinit after creating.
gcc/d/decl.cc