diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Transforms/Utils/BasicBlockUtils.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/llvm/Transforms/Utils/BasicBlockUtils.h b/include/llvm/Transforms/Utils/BasicBlockUtils.h index 9fe7e47..4c12c70 100644 --- a/include/llvm/Transforms/Utils/BasicBlockUtils.h +++ b/include/llvm/Transforms/Utils/BasicBlockUtils.h @@ -86,9 +86,10 @@ inline bool SplitCriticalEdge(BasicBlock *Succ, pred_iterator PI, Pass *P = 0) { inline bool SplitCriticalEdge(BasicBlock *Src, BasicBlock *Dst, Pass *P = 0) { TerminatorInst *TI = Src->getTerminator(); - for (unsigned i = 0, e = TI->getNumSuccessors(); ; ++i) + for (unsigned i = 0, e = TI->getNumSuccessors(); i != e; ++i) if (TI->getSuccessor(i) == Dst) return SplitCriticalEdge(TI, i, P); + return false; } } // End llvm namespace |