diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-31 21:59:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-31 21:59:59 +0000 |
commit | afbafb55ea40cfca5247decefd375274ffd662ae (patch) | |
tree | 635809370525501d08172337c5477cf8a947c14e /llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp | |
parent | acccf32aa3e5485aa6b92d419859faa0a07c15d3 (diff) | |
download | bcm5719-llvm-afbafb55ea40cfca5247decefd375274ffd662ae.tar.gz bcm5719-llvm-afbafb55ea40cfca5247decefd375274ffd662ae.zip |
MBB::remove should not modify the iterator passed in
llvm-svn: 12572
Diffstat (limited to 'llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp')
-rw-r--r-- | llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp index 5395a8197cf..63062691915 100644 --- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/llvm/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) |