summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-05-19 21:47:12 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-05-19 21:47:12 +0000
commitb868ec1c2f4e36033fd67f99a76d4d9d0d68da46 (patch)
tree3756ff226b04cb7c7b0322307a68fb6283dd391e
parentde1970fe668a345b4dd033a82581b2cf50b0cfe4 (diff)
downloadbcm5719-llvm-b868ec1c2f4e36033fd67f99a76d4d9d0d68da46.tar.gz
bcm5719-llvm-b868ec1c2f4e36033fd67f99a76d4d9d0d68da46.zip
[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. llvm-svn: 237731
-rw-r--r--llvm/include/llvm/IR/IRBuilder.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 1c2f178b9f4..31344c8d4a7 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -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))
OpenPOWER on IntegriCloud