mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Use llvm::CallSite instead of custom CallOrInvoke class.
This commit is contained in:
parent
b7febcf35a
commit
dd41366a99
9 changed files with 46 additions and 76 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue