We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47c76e7 commit 8c33044Copy full SHA for 8c33044
llvm/tools/llvm-diff/lib/DifferenceEngine.cpp
@@ -214,11 +214,9 @@ class FunctionDifferenceEngine {
214
};
215
216
unsigned getUnprocPredCount(const BasicBlock *Block) const {
217
- unsigned Count = 0;
218
- for (const_pred_iterator I = pred_begin(Block), E = pred_end(Block); I != E;
219
- ++I)
220
- if (!Blocks.count(*I)) Count++;
221
- return Count;
+ return llvm::count_if(predecessors(Block), [&](const BasicBlock *Pred) {
+ return !Blocks.contains(Pred);
+ });
222
}
223
224
typedef std::pair<const BasicBlock *, const BasicBlock *> BlockPair;
0 commit comments