diff options
author | Chris Lattner <sabre@nondot.org> | 2004-06-29 06:56:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-06-29 06:56:51 +0000 |
commit | 59850a8f8f94c59e8894edcbf8629a5d88624dc6 (patch) | |
tree | a29e65956955a8226f4affc16a831399fd3435f3 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 8b486a114e3dad9b4ebeb153719952335436100b (diff) |
Do not dereference end iterators. It hurts when you do that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14474 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 196d6944b7..7569875ad0 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -356,8 +356,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb, } // a variable can only be killed by subsequent instructions - do { - ++mi; + for (++mi; mi != e; ++mi) { baseIndex += InstrSlots::NUM; for (KillIter ki = lv_->killed_begin(mi), ke = lv_->killed_end(mi); ki != ke; ++ki) { @@ -367,7 +366,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb, goto exit; } } - } while (mi != e); + } exit: assert(start < end && "did not find end of interval?"); |