Mercurial > projects > ldc
diff gen/tocall.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 | b975f29b7256 |
children | a34078905d01 |
line wrap: on
line diff
--- a/gen/tocall.cpp Tue Aug 05 08:08:00 2008 +0200 +++ b/gen/tocall.cpp Tue Aug 05 19:28:19 2008 +0200 @@ -118,7 +118,7 @@ } const LLStructType* vtype = LLStructType::get(vtypes); Logger::cout() << "d-variadic argument struct type:\n" << *vtype << '\n'; - LLValue* mem = new llvm::AllocaInst(vtype,"_argptr_storage",gIR->topallocapoint()); + LLValue* mem = DtoAlloca(vtype,"_argptr_storage"); // store arguments in the struct for (int i=begin,k=0; i<arguments->dim; i++,k++) @@ -230,7 +230,7 @@ // return in hidden ptr is first if (retinptr) { - LLValue* retvar = new llvm::AllocaInst(argiter->get()->getContainedType(0), ".rettmp", gIR->topallocapoint()); + LLValue* retvar = DtoAlloca(argiter->get()->getContainedType(0), ".rettmp"); ++argiter; args.push_back(retvar); palist = palist.addAttr(1, llvm::ParamAttr::StructRet);