Mercurial > projects > ldc
diff gen/toir.cpp @ 1231:212ec2d9d176
Fixed some minitest regressions.
author | Tomas Lindquist Olsen <tomas.l.olsen gmail.com> |
---|---|
date | Thu, 16 Apr 2009 19:21:30 +0200 |
parents | 79758fd2f48a |
children | 465a77c904d4 |
line wrap: on
line diff
--- a/gen/toir.cpp Thu Apr 16 13:18:56 2009 +0200 +++ b/gen/toir.cpp Thu Apr 16 19:21:30 2009 +0200 @@ -982,6 +982,7 @@ } else if (e1->op == TOKstructliteral) { + // FIXME: is this right? StructLiteralExp* slexp = (StructLiteralExp*)e1; LLConstant* lit = slexp->toConstElem(p); return lit; @@ -2409,8 +2410,7 @@ } // vector of values to build aggregate from - std::vector<LLValue*> values;// = DtoStructLiteralValues(sd, inits); - assert(0 && "struct literal exp todo"); + std::vector<LLValue*> values = DtoStructLiteralValues(sd, inits); // get the struct type from the values size_t n = values.size(); @@ -2459,8 +2459,7 @@ inits[i] = exprs[i]->toConstElem(p); // vector of values to build aggregate from - std::vector<LLValue*> values;// = DtoStructLiteralValues(sd, inits); - assert(0 && "struct literal const exp todo"); + std::vector<LLValue*> values = DtoStructLiteralValues(sd, inits); // we know those values are constants.. cast them std::vector<LLConstant*> constvals(values.size(), NULL);