Do not use the same variable name for two different variables in the
authorChris Lattner <sabre@nondot.org>
Thu, 14 Oct 2004 14:59:16 +0000 (14:59 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Oct 2004 14:59:16 +0000 (14:59 +0000)
same scope.  This confused VC++ (and probably people too!).  Patch by
Morten Ofstad!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16985 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/PostDominators.cpp

index e5908c496b4c95b2e8c43defb525d48a57161102..08822949c6292aa6b0b054b4db344dd71f389be8 100644 (file)
@@ -182,9 +182,8 @@ void PostDominatorTree::calculate(const PostDominatorSet &DS) {
       // be a predecessor in the depth first order that we are iterating through
       // the function.
       //
-      DominatorSet::DomSetType::const_iterator I = Dominators.begin();
-      DominatorSet::DomSetType::const_iterator End = Dominators.end();
-      for (; I != End; ++I) {   // Iterate over dominators...
+      for (DominatorSet::DomSetType::const_iterator I = Dominators.begin(),
+           E = Dominators.end(); I != E; ++I) {  // Iterate over dominators.
         // All of our dominators should form a chain, where the number
         // of elements in the dominator set indicates what level the
         // node is at in the chain.  We want the node immediately