[llvm] r237731 - [opaque pointer type] Provide a convenience function for creating direct CallInsts to Functions in IRBuilder
David Blaikie
dblaikie at gmail.com
Tue May 19 14:47:12 PDT 2015
Author: dblaikie
Date: Tue May 19 16:47:12 2015
New Revision: 237731
URL: http://llvm.org/viewvc/llvm-project?rev=237731&view=rev
Log:
[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.
Modified:
llvm/trunk/include/llvm/IR/IRBuilder.h
Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=237731&r1=237730&r2=237731&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/IRBuilder.h Tue May 19 16:47:12 2015
@@ -1472,6 +1472,11 @@ public:
return Insert(CallInst::Create(FTy, Callee, Args), Name);
}
+ CallInst *CreateCall(Function *Callee, ArrayRef<Value *> 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<Constant>(C))
More information about the llvm-commits
mailing list