Move AllocaInst creation into DtoAlloca helper. Will enable special zero-init of fp80 reals' padding.

This commit is contained in:
Christian Kamm
2008-08-05 19:28:19 +02:00
parent 866360c23b
commit 8362b86c5a
12 changed files with 60 additions and 39 deletions

View File

@@ -475,7 +475,7 @@ DValue* DtoCastComplex(Loc& loc, DValue* val, Type* _to)
// unfortunately at this point, the cast value can show up as the lvalue for += and similar expressions.
// so we need to give it storage, or fix the system that handles this stuff (DLRValue)
LLValue* mem = new llvm::AllocaInst(DtoType(_to), "castcomplextmp", gIR->topallocapoint());
LLValue* mem = DtoAlloca(DtoType(_to), "castcomplextmp");
DtoComplexSet(mem, re, im);
return new DLRValue(val, new DImValue(_to, mem));
}