From 7354768c56dbf6ee349e2066c45ac4e69bdceb9f Mon Sep 17 00:00:00 2001 From: Jakub Staszak Date: Tue, 5 Mar 2013 21:53:57 +0000 Subject: [PATCH] std::distance() == 0 means that iterators are equal. No functionality change. llvm-svn: 176516 --- include/llvm/Analysis/Dominators.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index d62a3ac6709..b4cdbbc20e2 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -663,8 +663,7 @@ public: // Initialize the roots list for (typename TraitsTy::nodes_iterator I = TraitsTy::nodes_begin(&F), E = TraitsTy::nodes_end(&F); I != E; ++I) { - if (std::distance(TraitsTy::child_begin(I), - TraitsTy::child_end(I)) == 0) + if (TraitsTy::child_begin(I) == TraitsTy::child_end(I)) addRoot(I); // Prepopulate maps so that we don't get iterator invalidation issues later.