More changes to std::vector usage.

Replace with std::vector with static array, llvm::SmallVector or
add code to reserve space.
This commit is contained in:
kai
2013-03-17 22:05:04 +01:00
parent bc09ceae18
commit 7d65a311b1
9 changed files with 70 additions and 76 deletions

View File

@@ -143,39 +143,28 @@ LLCallSite IRState::CreateCallOrInvoke(LLValue* Callee, const char* Name)
LLCallSite IRState::CreateCallOrInvoke(LLValue* Callee, LLValue* Arg1, const char* Name)
{
LLSmallVector<LLValue*, 1> args;
args.push_back(Arg1);
LLValue* args[] = { Arg1 };
return CreateCallOrInvoke(Callee, args, Name);
}
LLCallSite IRState::CreateCallOrInvoke2(LLValue* Callee, LLValue* Arg1, LLValue* Arg2, const char* Name)
{
LLSmallVector<LLValue*, 2> args;
args.push_back(Arg1);
args.push_back(Arg2);
LLValue* args[] = { Arg1, Arg2 };
return CreateCallOrInvoke(Callee, args, Name);
}
LLCallSite 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);
LLValue* args[] = { Arg1, Arg2, Arg3 };
return CreateCallOrInvoke(Callee, args, Name);
}
LLCallSite 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);
LLValue* args[] = { Arg1, Arg2, Arg3, Arg4 };
return CreateCallOrInvoke(Callee, args, Name);
}
//////////////////////////////////////////////////////////////////////////////////////////
IRBuilder<>* IRBuilderHelper::operator->()