From: David Blaikie Date: Tue, 19 May 2015 21:47:12 +0000 (+0000) Subject: [opaque pointer type] Provide a convenience function for creating direct CallInsts... X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=b9b3fb261eb61e5613032e5c13dfadde870d2cab [opaque pointer type] Provide a convenience function for creating direct CallInsts to Functions in IRBuilder Might need a similar convenience in CallInst's ctor too, but we'll see/will add it when it becomes useful. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237731 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/IRBuilder.h b/include/llvm/IR/IRBuilder.h index 1c2f178b9f4..31344c8d4a7 100644 --- a/include/llvm/IR/IRBuilder.h +++ b/include/llvm/IR/IRBuilder.h @@ -1472,6 +1472,11 @@ public: return Insert(CallInst::Create(FTy, Callee, Args), Name); } + CallInst *CreateCall(Function *Callee, ArrayRef Args, + const Twine &Name = "") { + return CreateCall(Callee->getFunctionType(), Callee, Args, Name); + } + Value *CreateSelect(Value *C, Value *True, Value *False, const Twine &Name = "") { if (Constant *CC = dyn_cast(C))