comparison gen/arrays.cpp @ 1638:0de4525a9ed6

Apply workaround for #395 by klickverbot.
author Christian Kamm <kamm incasoftware de>
date Mon, 08 Mar 2010 20:06:08 +0100
parents 5c0cebff9be8
children 8f121883bce8
comparison
equal deleted inserted replaced
1636:332925de1881 1638:0de4525a9ed6
543 LLValue *valueToAppend; 543 LLValue *valueToAppend;
544 if (expVal->isLVal()) 544 if (expVal->isLVal())
545 valueToAppend = expVal->getLVal(); 545 valueToAppend = expVal->getLVal();
546 else { 546 else {
547 valueToAppend = DtoAlloca(expVal->getType(), ".appendingElementOnStack"); 547 valueToAppend = DtoAlloca(expVal->getType(), ".appendingElementOnStack");
548 DtoStore(expVal->getRVal(), valueToAppend); 548 DVarValue lval(expVal->getType(), valueToAppend);
549 Loc loc;
550 DtoAssign(loc, &lval, expVal);
549 } 551 }
550 552
551 LLFunction* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_arrayappendcT"); 553 LLFunction* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_arrayappendcT");
552 LLSmallVector<LLValue*,3> args; 554 LLSmallVector<LLValue*,3> args;
553 args.push_back(DtoTypeInfoOf(arrayType)); 555 args.push_back(DtoTypeInfoOf(arrayType));