Use llvm::CallSite instead of custom CallOrInvoke class.

This commit is contained in:
Frits van Bommel
2009-02-28 22:16:52 +01:00
parent b7febcf35a
commit dd41366a99
9 changed files with 46 additions and 76 deletions

View File

@@ -459,10 +459,10 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
Logger::cout() << "Calling: " << *callable << '\n';
// call the function
CallOrInvoke* call = gIR->CreateCallOrInvoke(callable, args.begin(), args.end(), varname);
LLCallSite call = gIR->CreateCallOrInvoke(callable, args.begin(), args.end(), varname);
// get return value
LLValue* retllval = (retinptr) ? args[0] : call->get();
LLValue* retllval = (retinptr) ? args[0] : call.getInstruction();
if (tf->linkage == LINKintrinsic)
{
@@ -521,11 +521,11 @@ DValue* DtoCallFunction(Loc& loc, Type* resulttype, DValue* fnval, Expressions*
if (llfunc && llfunc->isIntrinsic()) // override intrinsic attrs
attrlist = llvm::Intrinsic::getAttributes((llvm::Intrinsic::ID)llfunc->getIntrinsicID());
else
call->setCallingConv(callconv);
call.setCallingConv(callconv);
}
else
call->setCallingConv(callconv);
call->setAttributes(attrlist);
call.setCallingConv(callconv);
call.setAttributes(attrlist);
return new DImValue(resulttype, retllval);
}