mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-03 11:24:18 +00:00
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
This commit is contained in:
@ -73,7 +73,7 @@ bool RegToMem::runOnFunction(Function &F) {
|
||||
|
||||
// Insert all new allocas into entry block.
|
||||
BasicBlock *BBEntry = &F.getEntryBlock();
|
||||
assert(pred_begin(BBEntry) == pred_end(BBEntry) &&
|
||||
assert(pred_empty(BBEntry) &&
|
||||
"Entry block to function must not have predecessors!");
|
||||
|
||||
// Find first non-alloca instruction and create insertion point. This is
|
||||
|
Reference in New Issue
Block a user