mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-20 21:53:14 +01:00
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:
@@ -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->()
|
||||
|
||||
Reference in New Issue
Block a user