mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 16:11:08 +03:00
Revise DtoGEP() helpers and mark most GEPs inbounds
This commit is contained in:
parent
5efb6bd1eb
commit
956061c3c7
8 changed files with 53 additions and 81 deletions
|
@ -167,7 +167,7 @@ static void DtoArrayInit(Loc &loc, LLValue *ptr, LLValue *length,
|
|||
LLValue *itr_val = DtoLoad(itr);
|
||||
// assign array element value
|
||||
DValue *arrayelem = new DVarValue(
|
||||
dvalue->type->toBasetype(), DtoGEP1(ptr, itr_val, "arrayinit.arrayelem"));
|
||||
dvalue->type->toBasetype(), DtoGEP1(ptr, itr_val, true, "arrayinit.arrayelem"));
|
||||
DtoAssign(loc, arrayelem, dvalue, op);
|
||||
|
||||
// increment iterator
|
||||
|
@ -761,7 +761,7 @@ void DtoCatAssignElement(Loc &loc, Type *arrayType, DValue *array,
|
|||
appendedArray = DtoAggrPaint(appendedArray, DtoType(arrayType));
|
||||
|
||||
LLValue *val = DtoArrayPtr(array);
|
||||
val = DtoGEP1(val, oldLength, ".lastElem");
|
||||
val = DtoGEP1(val, oldLength, true, ".lastElem");
|
||||
DtoAssign(loc, new DVarValue(arrayType->nextOf(), val), expVal, TOKblit);
|
||||
callPostblit(loc, exp, val);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue