Use llvmdc helpers for store and bitcast in fp80 padding init code.

This commit is contained in:
Christian Kamm 2008-08-05 20:23:44 +02:00
parent b2efd0d317
commit 14c3e022e4

View file

@ -94,9 +94,9 @@ llvm::AllocaInst* DtoAlloca(const LLType* lltype, const std::string& name)
if(lltype == LLType::X86_FP80Ty)
{
llvm::AllocaInst* alloca = new llvm::AllocaInst(lltype, name, gIR->topallocapoint());
LLValue* castv = new llvm::BitCastInst(alloca, getPtrToType(LLType::Int16Ty), "fp80toi16", gIR->scopebb());
LLValue* castv = DtoBitCast(alloca, getPtrToType(LLType::Int16Ty), "fp80toi16");
LLValue* padding = DtoGEPi1(castv, 5, "fp80padding");
new llvm::StoreInst(llvm::Constant::getNullValue(LLType::Int16Ty), padding, gIR->scopebb());
DtoStore(llvm::Constant::getNullValue(LLType::Int16Ty), padding);
return alloca;
}