mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-20 14:15:22 +02:00
[svn r301] Fixed incorrect codegen with array slice assigns.
This commit is contained in:
@@ -364,7 +364,7 @@ static LLValue* get_slice_ptr(DSliceValue* e, LLValue*& sz)
|
|||||||
// this means it's a real slice
|
// this means it's a real slice
|
||||||
ret = e->ptr;
|
ret = e->ptr;
|
||||||
|
|
||||||
size_t elembsz = getABITypeSize(ret->getType());
|
size_t elembsz = getABITypeSize(ret->getType()->getContainedType(0));
|
||||||
llvm::ConstantInt* elemsz = llvm::ConstantInt::get(DtoSize_t(), elembsz, false);
|
llvm::ConstantInt* elemsz = llvm::ConstantInt::get(DtoSize_t(), elembsz, false);
|
||||||
|
|
||||||
if (isaConstantInt(e->len)) {
|
if (isaConstantInt(e->len)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user