[svn r336] Made sure calls within a landing pad area are invokes.

Nested trys still need some consideration.
This commit is contained in:
Christian Kamm
2008-07-03 22:05:45 +02:00
parent 9f0b3fb062
commit 37305fb47e
10 changed files with 163 additions and 105 deletions

View File

@@ -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->()