projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af05c69
)
Guard against de-referencing MBB.end().
author
Evan Cheng
<evan.cheng@apple.com>
Tue, 22 Feb 2011 07:07:59 +0000
(07:07 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Tue, 22 Feb 2011 07:07:59 +0000
(07:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126192
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/ARM/Thumb2InstrInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/ARM/Thumb2InstrInfo.cpp
b/lib/Target/ARM/Thumb2InstrInfo.cpp
index 836c1baffd40852033edfe039036813b5485bc9a..9b1073be3c8e42b6d23829012f4208bca09aa690 100644
(file)
--- a/
lib/Target/ARM/Thumb2InstrInfo.cpp
+++ b/
lib/Target/ARM/Thumb2InstrInfo.cpp
@@
-95,8
+95,11
@@
Thumb2InstrInfo::ReplaceTailWithBranchTo(MachineBasicBlock::iterator Tail,
bool
Thumb2InstrInfo::isLegalToSplitMBBAt(MachineBasicBlock &MBB,
MachineBasicBlock::iterator MBBI) const {
- while (MBBI->isDebugValue())
+ while (MBBI->isDebugValue())
{
++MBBI;
+ if (MBBI == MBB.end())
+ return false;
+ }
unsigned PredReg = 0;
return llvm::getITInstrPredicate(MBBI, PredReg) == ARMCC::AL;