mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 02:45:25 +03:00
[svn r227] Fixed: crash in lifetime.d when resizing array of AAs by .length assignment.
This commit is contained in:
parent
a954f06e90
commit
6b735db510
4 changed files with 18 additions and 10 deletions
|
@ -545,7 +545,10 @@ DSliceValue* DtoResizeDynArray(Type* arrayType, DValue* array, DValue* newdim)
|
|||
assert(arrayType);
|
||||
assert(arrayType->toBasetype()->ty == Tarray);
|
||||
|
||||
bool zeroInit = arrayType->toBasetype()->nextOf()->isZeroInit();
|
||||
// decide on what runtime function to call based on whether the type is zero initialized
|
||||
bool zeroInit = arrayType->toBasetype()->next->isZeroInit();
|
||||
|
||||
// call runtime
|
||||
llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, zeroInit ? "_d_arraysetlengthT" : "_d_arraysetlengthiT" );
|
||||
|
||||
llvm::SmallVector<llvm::Value*,4> args;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue