summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 74ece385581..b0d99a8e830 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -343,15 +343,7 @@ static void HandleInlinedEHPad(InvokeInst *II, BasicBlock *FirstNewBlock,
continue;
Instruction *Replacement = nullptr;
- if (auto *TPI = dyn_cast<TerminatePadInst>(I)) {
- if (TPI->unwindsToCaller()) {
- SmallVector<Value *, 3> TerminatePadArgs;
- for (Value *ArgOperand : TPI->arg_operands())
- TerminatePadArgs.push_back(ArgOperand);
- Replacement = TerminatePadInst::Create(TPI->getParentPad(), UnwindDest,
- TerminatePadArgs, TPI);
- }
- } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) {
+ if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) {
if (CatchSwitch->unwindsToCaller()) {
auto *NewCatchSwitch = CatchSwitchInst::Create(
CatchSwitch->getParentPad(), UnwindDest,
@@ -1441,10 +1433,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
if (!I->isEHPad())
continue;
- if (auto *TPI = dyn_cast<TerminatePadInst>(I)) {
- if (isa<ConstantTokenNone>(TPI->getParentPad()))
- TPI->setParentPad(CallSiteEHPad);
- } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) {
+ if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) {
if (isa<ConstantTokenNone>(CatchSwitch->getParentPad()))
CatchSwitch->setParentPad(CallSiteEHPad);
} else {
OpenPOWER on IntegriCloud