[llvm-commits] [llvm] r129039 - /llvm/trunk/include/llvm/Support/IRBuilder.h
Nick Lewycky
nicholas at mxc.ca
Wed Apr 6 17:03:25 PDT 2011
Author: nicholas
Date: Wed Apr 6 19:03:25 2011
New Revision: 129039
URL: http://llvm.org/viewvc/llvm-project?rev=129039&view=rev
Log:
Add support for ArrayRef in IRBuilder's CreateCall.
Modified:
llvm/trunk/include/llvm/Support/IRBuilder.h
Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=129039&r1=129038&r2=129039&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Wed Apr 6 19:03:25 2011
@@ -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 @@
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 = "") {
More information about the llvm-commits
mailing list