Mercurial > projects > ldc
diff gen/arrays.cpp @ 1350:15e9762bb620
Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Thu, 14 May 2009 13:26:40 +0200 |
parents | 16d9afa22df4 |
children | 229e02867307 |
line wrap: on
line diff
--- a/gen/arrays.cpp Wed May 13 18:08:40 2009 +0200 +++ b/gen/arrays.cpp Thu May 14 13:26:40 2009 +0200 @@ -77,7 +77,7 @@ // give slices and complex values storage (and thus an address to pass) if (value->isSlice()) { - val = DtoAlloca(DtoType(value->getType()), ".tmpparam"); + val = DtoAlloca(value->getType(), ".tmpparam"); DVarValue lval(value->getType(), val); DtoAssign(loc, &lval, value); } @@ -448,7 +448,7 @@ LLFunction* fn = LLVM_D_GetRuntimeFunction(gIR->module, fnname); // build dims - LLValue* dimsArg = DtoAlloca(DtoSize_t(), DtoConstUint(ndims), ".newdims"); + LLValue* dimsArg = DtoArrayAlloca(Type::tsize_t, ndims, ".newdims"); LLValue* firstDim = NULL; for (size_t i=0; i<ndims; ++i) {