Standardize {pred,succ,use,user}_empty()
authorRamkumar Ramachandra <artagnon@gmail.com>
Tue, 13 Jan 2015 03:46:47 +0000 (03:46 +0000)
committerRamkumar Ramachandra <artagnon@gmail.com>
Tue, 13 Jan 2015 03:46:47 +0000 (03:46 +0000)
commit2bcc808cf9eb24d7ed58c8913947d2f30fce76fe
tree97824a782e5cf57a590c823a304c83b2eed4d12c
parent3423a7b24fa56debffd84809d8c706428ff83f58
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225760 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/CFG.h
include/llvm/IR/Value.h
lib/Analysis/CFG.cpp
lib/IR/Verifier.cpp
lib/Transforms/IPO/PruneEH.cpp
lib/Transforms/Scalar/JumpThreading.cpp
lib/Transforms/Scalar/Reg2Mem.cpp
lib/Transforms/Utils/SimplifyCFG.cpp