commit | 56354d48bb937cbb23736d24d9ca4d7a0fcc97e0 | [log] [tgz] |
---|---|---|
author | Kalle Raiskila <kalle.raiskila@nokia.com> | Tue Oct 11 12:55:18 2011 +0000 |
committer | Kalle Raiskila <kalle.raiskila@nokia.com> | Tue Oct 11 12:55:18 2011 +0000 |
tree | 47027e4da118ba00237c518927f851a313b59193 | |
parent | f048c3fe24fc26692737c60656526abd3a9255a1 [diff] [blame] |
Fix a iterator out of bounds error, that triggers rarely. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141665 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/CellSPU/SPUInstrInfo.cpp b/lib/Target/CellSPU/SPUInstrInfo.cpp index 02cf9bf..007bc0e 100644 --- a/lib/Target/CellSPU/SPUInstrInfo.cpp +++ b/lib/Target/CellSPU/SPUInstrInfo.cpp
@@ -290,6 +290,8 @@ if (I->getOpcode() == SPU::HBRA || I->getOpcode() == SPU::HBR_LABEL){ I=MBB.erase(I); + if (I == MBB.end()) + break; } } }