diff options
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/Local.cpp | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp index a48d21e5366..cb884d189d8 100644 --- a/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp +++ b/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp @@ -936,7 +936,7 @@ void DevirtModule::applyICallBranchFunnel(VTableSlotInfo &SlotInfo, NewCS = IRB.CreateCall(NewFT, IRB.CreateBitCast(JT, NewFTPtr), Args); else NewCS = IRB.CreateInvoke( - IRB.CreateBitCast(JT, NewFTPtr), + NewFT, IRB.CreateBitCast(JT, NewFTPtr), cast<InvokeInst>(CS.getInstruction())->getNormalDest(), cast<InvokeInst>(CS.getInstruction())->getUnwindDest(), Args); NewCS.setCallingConv(CS.getCallingConv()); diff --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp index 9e609c387e4..383e6603762 100644 --- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp @@ -1724,8 +1724,8 @@ void DFSanVisitor::visitCallSite(CallSite CS) { CallSite NewCS; if (InvokeInst *II = dyn_cast<InvokeInst>(CS.getInstruction())) { - NewCS = IRB.CreateInvoke(Func, II->getNormalDest(), II->getUnwindDest(), - Args); + NewCS = IRB.CreateInvoke(NewFT, Func, II->getNormalDest(), + II->getUnwindDest(), Args); } else { NewCS = IRB.CreateCall(NewFT, Func, Args); } diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index b63f15bff4a..a05a7a23457 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -1980,8 +1980,9 @@ BasicBlock *llvm::changeToInvokeAndSplitBasicBlock(CallInst *CI, // can potentially be avoided with a cleverer API design that we do not have // as of this time. - InvokeInst *II = InvokeInst::Create(CI->getCalledValue(), Split, UnwindEdge, - InvokeArgs, OpBundles, CI->getName(), BB); + InvokeInst *II = + InvokeInst::Create(CI->getFunctionType(), CI->getCalledValue(), Split, + UnwindEdge, InvokeArgs, OpBundles, CI->getName(), BB); II->setDebugLoc(CI->getDebugLoc()); II->setCallingConv(CI->getCallingConv()); II->setAttributes(CI->getAttributes()); |