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
This commit is contained in:
Kalle Raiskila 2011-10-11 12:55:18 +00:00
parent f048c3fe24
commit 56354d48bb

View File

@ -290,6 +290,8 @@ static void removeHBR( MachineBasicBlock &MBB) {
if (I->getOpcode() == SPU::HBRA ||
I->getOpcode() == SPU::HBR_LABEL){
I=MBB.erase(I);
if (I == MBB.end())
break;
}
}
}