[llvm-commits] CVS: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Mar 31 16:00:09 PST 2004


Changes in directory llvm/lib/CodeGen/InstrSched:

InstrScheduling.cpp updated: 1.69 -> 1.70

---
Log message:

MBB::remove should not modify the iterator passed in


---
Diffs of the changes:  (+2 -1)

Index: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
diff -u llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.69 llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.70
--- llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.69	Sun Feb 29 00:30:45 2004
+++ llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp	Wed Mar 31 15:59:43 2004
@@ -648,7 +648,8 @@
   
   // Remove all except the dummy PHI instructions from MBB, and
   // pre-allocate create space for the ones we will put back in.
-  while (I != MBB.end()) MBB.remove(I);
+  while (I != MBB.end())
+    MBB.remove(I++);
   
   InstrSchedule::const_iterator NIend = S.isched.end();
   for (InstrSchedule::const_iterator NI = S.isched.begin(); NI != NIend; ++NI)





More information about the llvm-commits mailing list