mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-26 23:21:11 +00:00
[llvm-diff] Use llvm::predecessors (NFC)
This commit is contained in:
parent
47c76e7aba
commit
8c3304453c
@ -214,11 +214,9 @@ class FunctionDifferenceEngine {
|
||||
};
|
||||
|
||||
unsigned getUnprocPredCount(const BasicBlock *Block) const {
|
||||
unsigned Count = 0;
|
||||
for (const_pred_iterator I = pred_begin(Block), E = pred_end(Block); I != E;
|
||||
++I)
|
||||
if (!Blocks.count(*I)) Count++;
|
||||
return Count;
|
||||
return llvm::count_if(predecessors(Block), [&](const BasicBlock *Pred) {
|
||||
return !Blocks.contains(Pred);
|
||||
});
|
||||
}
|
||||
|
||||
typedef std::pair<const BasicBlock *, const BasicBlock *> BlockPair;
|
||||
|
Loading…
Reference in New Issue
Block a user