X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FAnalysis%2FCFG.cpp;h=9ebbb6784971b7ac6a890eb3259a2889fae65256;hb=cfd14e6aea88236309d8e7a115f77d3da919ba16;hp=050952fc4457c20a02575fa7a8785a12d5172118;hpb=56e1394c8861ecdc551815ae875d2c3db2fa9cdb;p=oota-llvm.git diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 050952fc445..9ebbb678497 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -168,8 +168,7 @@ static bool isPotentiallyReachableInner(SmallVectorImpl &Worklist, // ignoring any other blocks inside the loop body. Outer->getExitBlocks(Worklist); } else { - for (succ_iterator I = succ_begin(BB), E = succ_end(BB); I != E; ++I) - Worklist.push_back(*I); + Worklist.append(succ_begin(BB), succ_end(BB)); } } while (!Worklist.empty()); @@ -222,8 +221,7 @@ bool llvm::isPotentiallyReachable(const Instruction *A, const Instruction *B, return false; // Otherwise, continue doing the normal per-BB CFG walk. - for (succ_iterator I = succ_begin(BB), E = succ_end(BB); I != E; ++I) - Worklist.push_back(*I); + Worklist.append(succ_begin(BB), succ_end(BB)); if (Worklist.empty()) { // We've proven that there's no path!