diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-06-05 07:05:25 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-06-05 07:05:25 +0000 |
commit | c53ef58a3549131e5307f10417406e8fd8aea6d4 (patch) | |
tree | 3f18d74614430a1abfc0919b504ff672069514e5 /lib/CodeGen/IfConversion.cpp | |
parent | febca3499e5624361142dda2cb3c2ea806bfcdb6 (diff) |
I had a senior moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37433 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r-- | lib/CodeGen/IfConversion.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp index 1023f8fd95..c0c6b383e6 100644 --- a/lib/CodeGen/IfConversion.cpp +++ b/lib/CodeGen/IfConversion.cpp @@ -444,10 +444,11 @@ 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 != MF->end() && I != MachineFunction::iterator(ToBB)) - if (!I->empty()) + MachineFunction::iterator TI = ToBB; + MachineFunction::iterator E = BB->getParent()->end(); + while (++I != TI) + if (I == E || !I->empty()) return false; return true; } |