mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-04 22:13:14 +01:00
[svn r336] Made sure calls within a landing pad area are invokes.
Nested trys still need some consideration.
This commit is contained in:
@@ -123,6 +123,47 @@ bool IRState::scopereturned()
|
||||
return !scopebb()->empty() && scopebb()->back().isTerminator();
|
||||
}
|
||||
|
||||
CallOrInvoke* IRState::CreateCallOrInvoke(LLValue* Callee, const char* Name)
|
||||
{
|
||||
LLSmallVector<LLValue*, 1> args;
|
||||
return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name);
|
||||
}
|
||||
|
||||
CallOrInvoke* IRState::CreateCallOrInvoke(LLValue* Callee, LLValue* Arg1, const char* Name)
|
||||
{
|
||||
LLSmallVector<LLValue*, 1> args;
|
||||
args.push_back(Arg1);
|
||||
return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name);
|
||||
}
|
||||
|
||||
CallOrInvoke* IRState::CreateCallOrInvoke2(LLValue* Callee, LLValue* Arg1, LLValue* Arg2, const char* Name)
|
||||
{
|
||||
LLSmallVector<LLValue*, 2> args;
|
||||
args.push_back(Arg1);
|
||||
args.push_back(Arg2);
|
||||
return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name);
|
||||
}
|
||||
|
||||
CallOrInvoke* IRState::CreateCallOrInvoke3(LLValue* Callee, LLValue* Arg1, LLValue* Arg2, LLValue* Arg3, const char* Name)
|
||||
{
|
||||
LLSmallVector<LLValue*, 3> args;
|
||||
args.push_back(Arg1);
|
||||
args.push_back(Arg2);
|
||||
args.push_back(Arg3);
|
||||
return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name);
|
||||
}
|
||||
|
||||
CallOrInvoke* IRState::CreateCallOrInvoke4(LLValue* Callee, LLValue* Arg1, LLValue* Arg2, LLValue* Arg3, LLValue* Arg4, const char* Name)
|
||||
{
|
||||
LLSmallVector<LLValue*, 4> args;
|
||||
args.push_back(Arg1);
|
||||
args.push_back(Arg2);
|
||||
args.push_back(Arg3);
|
||||
args.push_back(Arg4);
|
||||
return CreateCallOrInvoke(Callee, args.begin(), args.end(), Name);
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
IRBuilder* IRBuilderHelper::operator->()
|
||||
|
||||
Reference in New Issue
Block a user