| commit | 68591286bc40d48c7e6b9043216e965c09d77f84 | [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 | 958413b1a1c343efb943847b8667e9c47f77ea94 | |
| parent | bd926cbdb5b92f7e51bc78d4865eacb87c3ae6f8 [diff] [blame] | 
Fix a iterator out of bounds error, that triggers rarely. llvm-svn: 141665
diff --git a/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp b/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp index 02cf9bf..007bc0e 100644 --- a/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp +++ b/llvm/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; } } }