summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 452ccff49d2..b9e6cd653ea 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -711,9 +711,9 @@ InvokeInst *InvokeInst::Create(InvokeInst *II, ArrayRef<OperandBundleDef> OpB,
Instruction *InsertPt) {
std::vector<Value *> Args(II->arg_begin(), II->arg_end());
- auto *NewII = InvokeInst::Create(II->getCalledValue(), II->getNormalDest(),
- II->getUnwindDest(), Args, OpB,
- II->getName(), InsertPt);
+ auto *NewII = InvokeInst::Create(II->getFunctionType(), II->getCalledValue(),
+ II->getNormalDest(), II->getUnwindDest(),
+ Args, OpB, II->getName(), InsertPt);
NewII->setCallingConv(II->getCallingConv());
NewII->SubclassOptionalData = II->SubclassOptionalData;
NewII->setAttributes(II->getAttributes());
OpenPOWER on IntegriCloud