From dbe949ede6493269366e6d8f406e04d17526f12b Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 12 Jun 2009 21:34:35 +0200 Subject: [PATCH] More DtoType -> DtoTypeNotVoid for getting the array element llvm type. --- gen/toir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index db913148..17d31c27 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -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);