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:
111354f
)
Forgot to check for if iterator reached the end.
author
Evan Cheng
<evan.cheng@apple.com>
Mon, 4 Jun 2007 20:33:36 +0000
(20:33 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Mon, 4 Jun 2007 20:33:36 +0000
(20:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37420
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/IfConversion.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/IfConversion.cpp
b/lib/CodeGen/IfConversion.cpp
index 57862eb38c52f717b792d5b0d826ad4ba79c05ce..95a5394f90b460912e959a641ac6f9f09fb9d8d1 100644
(file)
--- a/
lib/CodeGen/IfConversion.cpp
+++ b/
lib/CodeGen/IfConversion.cpp
@@
-441,8
+441,9
@@
bool IfConverter::AnalyzeBlocks(MachineFunction &MF,
/// isNextBlock - Returns true either if ToBB the next block after BB or
/// that all the intervening blocks are empty.
static bool isNextBlock(MachineBasicBlock *BB, MachineBasicBlock *ToBB) {
+ MachineFunction *MF = BB->getParent();
MachineFunction::iterator I = BB;
- while (++I != MachineFunction::iterator(ToBB))
+ while (++I != M
F->end() && I != M
achineFunction::iterator(ToBB))
if (!I->empty())
return false;
return true;