projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix a iterator out of bounds error, that triggers rarely.
[oota-llvm.git]
/
lib
/
Target
/
CellSPU
/
SPUInstrInfo.cpp
diff --git
a/lib/Target/CellSPU/SPUInstrInfo.cpp
b/lib/Target/CellSPU/SPUInstrInfo.cpp
index 02cf9bfa735ff74fe0a01c823ef173825ff23c9d..007bc0e02c7ec16b70363e9fbddc5ff09e395a5c 100644
(file)
--- a/
lib/Target/CellSPU/SPUInstrInfo.cpp
+++ b/
lib/Target/CellSPU/SPUInstrInfo.cpp
@@
-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;
}
}
}