[LAA] LLE 5/6: Add predicate functions Dependence::isForward/isBackward, NFC
[oota-llvm.git] / lib / Analysis / CFG.cpp
index e15109bd27027270a6643c554782350cb79e985e..041fcb6313bd4d43405ea7d49f3c7770fd10e3fc 100644 (file)
@@ -203,7 +203,8 @@ bool llvm::isPotentiallyReachable(const Instruction *A, const Instruction *B,
       return true;
 
     // Linear scan, start at 'A', see whether we hit 'B' or the end first.
-    for (BasicBlock::const_iterator I = A, E = BB->end(); I != E; ++I) {
+    for (BasicBlock::const_iterator I = A->getIterator(), E = BB->end(); I != E;
+         ++I) {
       if (&*I == B)
         return true;
     }