diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2015-01-13 03:46:47 +0000 |
---|---|---|
committer | Ramkumar Ramachandra <artagnon@gmail.com> | 2015-01-13 03:46:47 +0000 |
commit | 40c3e03e27c3c88b809ff1709fe3ebf571e93b4a (patch) | |
tree | 6b2c0e310808a5c88f3f262462b99040ccfc030f /llvm/lib/IR/Verifier.cpp | |
parent | 26a3924a4f6b92598078e77e07584448ad5cd76d (diff) | |
download | bcm5719-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/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index e02b9e34fa6..4bf2d1a6dc6 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -1128,7 +1128,7 @@ void Verifier::visitFunction(const Function &F) { // Check the entry node const BasicBlock *Entry = &F.getEntryBlock(); - Assert1(pred_begin(Entry) == pred_end(Entry), + Assert1(pred_empty(Entry), "Entry block to function must not have predecessors!", Entry); // The address of the entry block cannot be taken, unless it is dead. |