summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CFG.cpp
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2015-01-13 03:46:47 +0000
committerRamkumar Ramachandra <artagnon@gmail.com>2015-01-13 03:46:47 +0000
commit40c3e03e27c3c88b809ff1709fe3ebf571e93b4a (patch)
tree6b2c0e310808a5c88f3f262462b99040ccfc030f /llvm/lib/Analysis/CFG.cpp
parent26a3924a4f6b92598078e77e07584448ad5cd76d (diff)
downloadbcm5719-llvm-40c3e03e27c3c88b809ff1709fe3ebf571e93b4a.tar.gz
bcm5719-llvm-40c3e03e27c3c88b809ff1709fe3ebf571e93b4a.zip
Standardize {pred,succ,use,user}_empty()
The functions {pred,succ,use,user}_{begin,end} exist, but many users have to check *_begin() with *_end() by hand to determine if the BasicBlock or User is empty. Fix this with a standard *_empty(), demonstrating a few usecases. llvm-svn: 225760
Diffstat (limited to 'llvm/lib/Analysis/CFG.cpp')
-rw-r--r--llvm/lib/Analysis/CFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/CFG.cpp b/llvm/lib/Analysis/CFG.cpp
index 25e7bc0fc40..8ecd70b5d71 100644
--- a/llvm/lib/Analysis/CFG.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud