aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-31 21:59:59 +0000
committerChris Lattner <sabre@nondot.org>2004-03-31 21:59:59 +0000
commitb4186e0ccd8dd8630078147e022142a8b65c9383 (patch)
tree693c16b186710449a3285d900b7afd08ac4fc28f /lib/CodeGen
parent4f6410f5cb1c9ad8cbe4f5a96dd706023ff4dbc5 (diff)
downloadexternal_llvm-b4186e0ccd8dd8630078147e022142a8b65c9383.zip
external_llvm-b4186e0ccd8dd8630078147e022142a8b65c9383.tar.gz
external_llvm-b4186e0ccd8dd8630078147e022142a8b65c9383.tar.bz2
MBB::remove should not modify the iterator passed in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/InstrSched/InstrScheduling.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp
index 5395a81..6306269 100644
--- a/lib/CodeGen/InstrSched/InstrScheduling.cpp
+++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp
@@ -648,7 +648,8 @@ RecordSchedule(MachineBasicBlock &MBB, const SchedulingManager& S)
// 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)