[llvm-commits] [llvm] r40897 - /llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
David Greene
greened at obbligato.org
Tue Aug 7 09:44:38 PDT 2007
Author: greened
Date: Tue Aug 7 11:44:38 2007
New Revision: 40897
URL: http://llvm.org/viewvc/llvm-project?rev=40897&view=rev
Log:
Fix GLIBCXX_DEBUG error triggered by incrementing erased iterator.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=40897&r1=40896&r2=40897&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Tue Aug 7 11:44:38 2007
@@ -777,8 +777,8 @@
if (LBBI != DF->end()) {
DominanceFrontier::DomSetType &LBSet = LBBI->second;
for (DominanceFrontier::DomSetType::iterator LI = LBSet.begin(),
- LE = LBSet.end(); LI != LE; ++LI) {
- BasicBlock *B = *LI;
+ LE = LBSet.end(); LI != LE; /* NULL */) {
+ BasicBlock *B = *LI++;
if (OutSiders.count(B))
DF->removeFromFrontier(LBBI, B);
}
@@ -789,8 +789,8 @@
if (NBBI != DF->end()) {
DominanceFrontier::DomSetType NBSet = NBBI->second;
for (DominanceFrontier::DomSetType::iterator NI = NBSet.begin(),
- NE = NBSet.end(); NI != NE; ++NI) {
- BasicBlock *B = *NI;
+ NE = NBSet.end(); NI != NE; /* NULL */) {
+ BasicBlock *B = *NI++;
if (OutSiders.count(B))
DF->removeFromFrontier(NBBI, B);
}
More information about the llvm-commits
mailing list