diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-04-10 16:26:42 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-04-10 16:26:42 +0000 |
commit | 6e48a826e88bc5dbf4ae1b09e8e25812f818e62c (patch) | |
tree | 4a9a04ad0b04904a37b0a8918ebca6e32f5cfff9 /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
parent | 42b33806bfb744e24f0a90dacba621d8a042a5fa (diff) | |
download | llvm-6e48a826e88bc5dbf4ae1b09e8e25812f818e62c.zip llvm-6e48a826e88bc5dbf4ae1b09e8e25812f818e62c.tar.gz llvm-6e48a826e88bc5dbf4ae1b09e8e25812f818e62c.tar.bz2 |
[WinEH] Try to make outlining invokes work a little better
WinEH currently turns invokes into calls. Long term, we will reconsider
this, but for now, make sure we remap the operands and clone the
successors of the new terminator.
llvm-svn: 234608
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index ec95361..a376c3d 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -395,7 +395,7 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, if (Action == CloningDirector::CloneSuccessors) { // If the director says to skip with a terminate instruction, we still // need to clone this block's successors. - const TerminatorInst *TI = BB->getTerminator(); + const TerminatorInst *TI = NewBB->getTerminator(); for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) ToClone.push_back(TI->getSuccessor(i)); return; |