From: Tanya Lattner Date: Tue, 1 Apr 2008 23:41:44 +0000 (+0000) Subject: Reverting 49056 due to the build being broken. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=48afd9f8a94e8db7b9894d97a7e85fff97cff1bd;p=oota-llvm.git Reverting 49056 due to the build being broken. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49060 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopIndexSplit.cpp b/lib/Transforms/Scalar/LoopIndexSplit.cpp index 48b45351a0f..8053554c17c 100644 --- a/lib/Transforms/Scalar/LoopIndexSplit.cpp +++ b/lib/Transforms/Scalar/LoopIndexSplit.cpp @@ -232,8 +232,8 @@ bool LoopIndexSplit::runOnLoop(Loop *IncomingLoop, LPPassManager &LPM_Ref) { return false; // First see if it is possible to eliminate loop itself or not. - for (SmallVector::iterator SI = SplitData.begin(); - SI != SplitData.end();) { + for (SmallVector::iterator SI = SplitData.begin(), + E = SplitData.end(); SI != E;) { SplitInfo &SD = *SI; ICmpInst *CI = dyn_cast(SD.SplitCondition); if (SD.SplitCondition->getOpcode() == Instruction::And) { @@ -244,7 +244,8 @@ bool LoopIndexSplit::runOnLoop(Loop *IncomingLoop, LPPassManager &LPM_Ref) { return Changed; } else { SmallVector::iterator Delete_SI = SI; - SI = SplitData.erase(Delete_SI); + ++SI; + SplitData.erase(Delete_SI); } } else if (CI && CI->getPredicate() == ICmpInst::ICMP_EQ) { @@ -255,7 +256,8 @@ bool LoopIndexSplit::runOnLoop(Loop *IncomingLoop, LPPassManager &LPM_Ref) { return Changed; } else { SmallVector::iterator Delete_SI = SI; - SI = SplitData.erase(Delete_SI); + ++SI; + SplitData.erase(Delete_SI); } } else ++SI;