comparison gen/toir.cpp @ 603:10bc9eb9e262

Fix typo in ArrayLiteralExp::toConstElem.
author Christian Kamm <kamm incasoftware de>
date Tue, 16 Sep 2008 08:42:40 +0200
parents 48f079b4fe0f
children e235b80c92bc
comparison
equal deleted inserted replaced
602:48f079b4fe0f 603:10bc9eb9e262
2216 2216
2217 // build llvm array type 2217 // build llvm array type
2218 const LLArrayType* arrtype = LLArrayType::get(DtoType(elemt), elements->dim); 2218 const LLArrayType* arrtype = LLArrayType::get(DtoType(elemt), elements->dim);
2219 2219
2220 // dynamic arrays can occur here as well ... 2220 // dynamic arrays can occur here as well ...
2221 bool dyn = (bt->ty == Tsarray); 2221 bool dyn = (bt->ty == Tarray);
2222 if (!dyn) 2222 if (!dyn)
2223 assert(arrtype->getNumElements() == elements->dim); 2223 assert(arrtype->getNumElements() == elements->dim);
2224 else
2225 assert(bt->ty == Tarray);
2226 2224
2227 // build the initializer 2225 // build the initializer
2228 std::vector<LLConstant*> vals(elements->dim, NULL); 2226 std::vector<LLConstant*> vals(elements->dim, NULL);
2229 for (unsigned i=0; i<elements->dim; ++i) 2227 for (unsigned i=0; i<elements->dim; ++i)
2230 { 2228 {