diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
commit | 67c32a98315f785a9ec9d531c1f571a0196c7463 (patch) | |
tree | 4abb9cbeecc7901726dd0b4a37369596c852e9ef /lib/Analysis/CFG.cpp | |
parent | 9f61947910e6ab40de38e6b4034751ef1513200f (diff) |
Diffstat (limited to 'lib/Analysis/CFG.cpp')
-rw-r--r-- | lib/Analysis/CFG.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index 8ef5302717f8..8ecd70b5d716 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -27,7 +27,7 @@ using namespace llvm; void llvm::FindFunctionBackedges(const Function &F, SmallVectorImpl<std::pair<const BasicBlock*,const BasicBlock*> > &Result) { const BasicBlock *BB = &F.getEntryBlock(); - if (succ_begin(BB) == succ_end(BB)) + if (succ_empty(BB)) return; SmallPtrSet<const BasicBlock*, 8> Visited; @@ -45,7 +45,7 @@ void llvm::FindFunctionBackedges(const Function &F, bool FoundNew = false; while (I != succ_end(ParentBB)) { BB = *I++; - if (Visited.insert(BB)) { + if (Visited.insert(BB).second) { FoundNew = true; break; } @@ -141,7 +141,7 @@ static bool isPotentiallyReachableInner(SmallVectorImpl<BasicBlock *> &Worklist, SmallSet<const BasicBlock*, 64> Visited; do { BasicBlock *BB = Worklist.pop_back_val(); - if (!Visited.insert(BB)) + if (!Visited.insert(BB).second) continue; if (BB == StopBB) return true; |