diff options
Diffstat (limited to 'llvm/lib/CodeGen/WinEHPrepare.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index ea43cb2ffeb..3f666c944e2 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -3245,14 +3245,15 @@ void WinEHPrepare::colorFunclets(Function &F, } else { // Note that this is a member of the given color. FuncletBlocks[Color].insert(Visiting); - TerminatorInst *Terminator = Visiting->getTerminator(); - if (isa<CleanupReturnInst>(Terminator) || - isa<CatchReturnInst>(Terminator) || - isa<CleanupEndPadInst>(Terminator)) { - // These block's successors have already been queued with the parent - // color. - continue; - } + } + + TerminatorInst *Terminator = Visiting->getTerminator(); + if (isa<CleanupReturnInst>(Terminator) || + isa<CatchReturnInst>(Terminator) || + isa<CleanupEndPadInst>(Terminator)) { + // These blocks' successors have already been queued with the parent + // color. + continue; } for (BasicBlock *Succ : successors(Visiting)) { if (isa<CatchEndPadInst>(Succ->getFirstNonPHI())) { |

