From: Devang Patel Date: Mon, 11 Jun 2007 21:25:31 +0000 (+0000) Subject: simplify X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b28aaadfff12e1a697b2145b896c1b9fa0bcbffa;p=oota-llvm.git simplify git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37541 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 4a98b3fd355..8578faf76f6 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -708,10 +708,9 @@ static bool BlockDominatesAny(BasicBlock* A, const std::vector& B, void LoopSimplify::UpdateDomInfoForRevectoredPreds(BasicBlock *NewBB, std::vector &PredBlocks) { assert(!PredBlocks.empty() && "No predblocks??"); - assert(succ_begin(NewBB) != succ_end(NewBB) && - ++succ_begin(NewBB) == succ_end(NewBB) && - "NewBB should have a single successor!"); - BasicBlock *NewBBSucc = *succ_begin(NewBB); + assert(NewBB->getTerminator()->getNumSuccessors() == 1 + && "NewBB should have a single successor!"); + BasicBlock *NewBBSucc = NewBB->getTerminator()->getSuccessor(0); DominatorTree &DT = getAnalysis(); // The newly inserted basic block will dominate existing basic blocks iff the