Add support for ArrayRef in IRBuilder's CreateCall.

llvm-svn: 129039
This commit is contained in:
Nick Lewycky 2011-04-07 00:03:25 +00:00
parent bdff1c997a
commit 9363fdc9b7
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,7 @@
#include "llvm/Instructions.h"
#include "llvm/BasicBlock.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/ConstantFolder.h"
@ -1102,6 +1103,11 @@ public:
return Insert(CallInst::Create(Callee, Args, Args+5), Name);
}
CallInst *CreateCall(Value *Callee, ArrayRef<Value *> Arg,
const Twine &Name = "") {
return Insert(CallInst::Create(Callee, Arg.begin(), Arg.end(), Name));
}
template<typename RandomAccessIterator>
CallInst *CreateCall(Value *Callee, RandomAccessIterator ArgBegin,
RandomAccessIterator ArgEnd, const Twine &Name = "") {