mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 11:56:12 +03:00
[svn r314] Get correct value type for newing of multidimensional dynamic arrays.
Fixes array_initialization_26_E.
This commit is contained in:
parent
870aae3454
commit
c53562ee10
1 changed files with 6 additions and 1 deletions
|
@ -486,8 +486,13 @@ DSliceValue* DtoNewMulDimDynArray(Type* arrayType, DValue** dims, size_t ndims,
|
|||
// typeinfo arg
|
||||
LLValue* arrayTypeInfo = DtoTypeInfoOf(arrayType);
|
||||
|
||||
// get value type
|
||||
Type* vtype = arrayType->toBasetype();
|
||||
for (size_t i=0; i<ndims; ++i)
|
||||
vtype = vtype->nextOf();
|
||||
|
||||
// get runtime function
|
||||
bool zeroInit = arrayType->toBasetype()->nextOf()->isZeroInit();
|
||||
bool zeroInit = vtype->isZeroInit();
|
||||
LLFunction* fn = LLVM_D_GetRuntimeFunction(gIR->module, zeroInit ? "_d_newarraymT" : "_d_newarraymiT" );
|
||||
|
||||
// build dims
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue