summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-05-19 21:31:18 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-05-19 21:31:18 +0000
commit3a6a69c535066c7cadc434d693eeeb5e5886abb1 (patch)
tree75bcae1baca26ab6e843ba9a0b95f0f84941de42 /llvm
parentdee6ce71ac5d2e6a3d00615e2d8894f1e3330042 (diff)
downloadbcm5719-llvm-3a6a69c535066c7cadc434d693eeeb5e5886abb1.tar.gz
bcm5719-llvm-3a6a69c535066c7cadc434d693eeeb5e5886abb1.zip
[opaque pointer type] Provide the ability to pass an explicit type when creating a CallInst through IRBuilder
A use for this will be added to Clang shortly. I haven't hit the specific cases I want to cleanup in LLVM just yet. A utility that avoids the need for this in direct calls to llvm::Functions will be added too - since in that case the type can be retrieved from the llvm::Function directly. llvm-svn: 237728
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/IR/IRBuilder.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
index 730cb697100..1c2f178b9f4 100644
--- a/llvm/include/llvm/IR/IRBuilder.h
+++ b/llvm/include/llvm/IR/IRBuilder.h
@@ -21,6 +21,7 @@
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/ConstantFolder.h"
#include "llvm/IR/DataLayout.h"
+#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
@@ -1466,6 +1467,11 @@ public:
return Insert(CallInst::Create(Callee, Args), Name);
}
+ CallInst *CreateCall(llvm::FunctionType *FTy, Value *Callee,
+ ArrayRef<Value *> Args, const Twine &Name = "") {
+ return Insert(CallInst::Create(FTy, Callee, Args), Name);
+ }
+
Value *CreateSelect(Value *C, Value *True, Value *False,
const Twine &Name = "") {
if (Constant *CC = dyn_cast<Constant>(C))
OpenPOWER on IntegriCloud