From d11beffef4f1117aceb9f2f5532b4a317c30c05a Mon Sep 17 00:00:00 2001 From: Manuel Jacob Date: Sun, 20 Jul 2014 09:10:11 +0000 Subject: [C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges. Summary: This patch introduces two new iterator ranges and updates existing code to use it. No functional change intended. Test Plan: All tests (make check-all) still pass. Reviewers: dblaikie Reviewed By: dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D4481 llvm-svn: 213474 --- llvm/tools/llvm-diff/DifferenceEngine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/tools/llvm-diff/DifferenceEngine.cpp') diff --git a/llvm/tools/llvm-diff/DifferenceEngine.cpp b/llvm/tools/llvm-diff/DifferenceEngine.cpp index 7d379ef..f8e957f 100644 --- a/llvm/tools/llvm-diff/DifferenceEngine.cpp +++ b/llvm/tools/llvm-diff/DifferenceEngine.cpp @@ -125,8 +125,8 @@ class FunctionDifferenceEngine { unsigned getUnprocPredCount(BasicBlock *Block) const { unsigned Count = 0; - for (pred_iterator I = pred_begin(Block), E = pred_end(Block); I != E; ++I) - if (!Blocks.count(*I)) Count++; + for (BasicBlock *Pred : predecessors(Block)) + if (!Blocks.count(Pred)) Count++; return Count; } -- cgit v1.1