Mercurial > projects > ldc
diff gen/structs.cpp @ 1234:9201e0d41ee5
Fixed forward referenced structs.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 16 Apr 2009 20:41:27 +0200 |
parents | 212ec2d9d176 |
children | 3ddec21fe2b6 |
line wrap: on
line diff
--- a/gen/structs.cpp Thu Apr 16 20:31:21 2009 +0200 +++ b/gen/structs.cpp Thu Apr 16 20:41:27 2009 +0200 @@ -36,6 +36,10 @@ // make sure type exists DtoType(sd->type); + // if it's a forward declaration, all bets are off. The type should be enough + if (sd->sizeok != 1) + return; + // create the IrStruct IrStruct* irstruct = new IrStruct(sd); sd->ir.irStruct = irstruct;