diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2008-03-09 07:36:38 +0000 |
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2008-03-09 07:36:38 +0000 |
| commit | 6a13bd129a584e95acd9a107f8861d880a29e765 (patch) | |
| tree | c1dbe64bb5a12ce6999d9f3777fdd378b7cad211 /lib/Transforms | |
| parent | c581b10d2c3d78ce8fc6a3ad356525bf92ac976e (diff) | |
| download | external_llvm-6a13bd129a584e95acd9a107f8861d880a29e765.zip external_llvm-6a13bd129a584e95acd9a107f8861d880a29e765.tar.gz external_llvm-6a13bd129a584e95acd9a107f8861d880a29e765.tar.bz2 | |
A BB that unwind_to an "unwind" inst is that same as one that doesn't unwind_to
at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48096 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
| -rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 61da0d9..846c3bf 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -1370,7 +1370,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { new UnwindInst(Pred); // Use unwind. Changed = true; } - } else if (InvokeInst *II = dyn_cast<InvokeInst>(Pred->getTerminator())) + } else if (InvokeInst *II = dyn_cast<InvokeInst>(Pred->getTerminator())) { if (II->getUnwindDest() == BB) { // Insert a new branch instruction before the invoke, because this // is now a fall through... @@ -1388,6 +1388,9 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { delete II; Changed = true; } + } else if (Pred->getUnwindDest() == BB) { + Pred->setUnwindDest(NULL); + } Preds.pop_back(); } |
