comparison gen/complex.cpp @ 479:672eb4893b55

Move AllocaInst creation into DtoAlloca helper. Will enable special zero-init of fp80 reals' padding.
author Christian Kamm <kamm incasoftware de>
date Tue, 05 Aug 2008 19:28:19 +0200
parents cc40db549aea
children a34078905d01
comparison
equal deleted inserted replaced
478:b657298222d9 479:672eb4893b55
473 if (val->isComplex()) 473 if (val->isComplex())
474 return new DComplexValue(_to, re, im); 474 return new DComplexValue(_to, re, im);
475 475
476 // unfortunately at this point, the cast value can show up as the lvalue for += and similar expressions. 476 // unfortunately at this point, the cast value can show up as the lvalue for += and similar expressions.
477 // so we need to give it storage, or fix the system that handles this stuff (DLRValue) 477 // so we need to give it storage, or fix the system that handles this stuff (DLRValue)
478 LLValue* mem = new llvm::AllocaInst(DtoType(_to), "castcomplextmp", gIR->topallocapoint()); 478 LLValue* mem = DtoAlloca(DtoType(_to), "castcomplextmp");
479 DtoComplexSet(mem, re, im); 479 DtoComplexSet(mem, re, im);
480 return new DLRValue(val, new DImValue(_to, mem)); 480 return new DLRValue(val, new DImValue(_to, mem));
481 } 481 }
482 else if (to->isimaginary()) { 482 else if (to->isimaginary()) {
483 if (val->isComplex()) 483 if (val->isComplex())