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

@ -736,9 +736,9 @@ static LLValue* call_string_switch_runtime(llvm::Value* table, Expression* e)
LLValue* llval = val->getRVal();
assert(llval->getType() == fn->getFunctionType()->getParamType(1));
CallOrInvoke* call = gIR->CreateCallOrInvoke2(fn, table, llval, "tmp");
LLCallSite call = gIR->CreateCallOrInvoke2(fn, table, llval, "tmp");
return call->get();
return call.getInstruction();
}
void SwitchStatement::toIR(IRState* p)
@ -1438,7 +1438,7 @@ void SwitchErrorStatement::toIR(IRState* p)
args.push_back(c);
// call
CallOrInvoke* call = gIR->CreateCallOrInvoke(fn, args.begin(), args.end());
gIR->CreateCallOrInvoke(fn, args.begin(), args.end());
gIR->ir->CreateUnreachable();
}