From c60a47509162412c4a776abae28402541bb73b15 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Thu, 7 Apr 2011 00:03:25 +0000 Subject: [PATCH] Add support for ArrayRef in IRBuilder's CreateCall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129039 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/IRBuilder.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index 6d0c196e32b..626d22cea35 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -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 Arg, + const Twine &Name = "") { + return Insert(CallInst::Create(Callee, Arg.begin(), Arg.end(), Name)); + } + template CallInst *CreateCall(Value *Callee, RandomAccessIterator ArgBegin, RandomAccessIterator ArgEnd, const Twine &Name = "") {