More DtoType -> DtoTypeNotVoid for getting the array element llvm type.

This commit is contained in:
Christian Kamm
2009-06-12 21:34:35 +02:00
parent 1563c14e7a
commit dbe949ede6

View File

@@ -466,7 +466,7 @@ LLConstant* StringExp::toConstElem(IRState* p)
bool nullterm = (t->ty != Tsarray);
size_t endlen = nullterm ? len+1 : len;
const LLType* ct = DtoType(cty);
const LLType* ct = DtoTypeNotVoid(cty);
const LLArrayType* at = LLArrayType::get(ct,endlen);
LLConstant* _init;
@@ -2377,7 +2377,7 @@ LLConstant* ArrayLiteralExp::toConstElem(IRState* p)
Type* elemt = bt->nextOf();
// build llvm array type
const LLArrayType* arrtype = LLArrayType::get(DtoType(elemt), elements->dim);
const LLArrayType* arrtype = LLArrayType::get(DtoTypeNotVoid(elemt), elements->dim);
// dynamic arrays can occur here as well ...
bool dyn = (bt->ty == Tarray);