[llvm-commits] CVS: llvm/lib/Analysis/PostDominators.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Oct 14 07:59:29 PDT 2004



Changes in directory llvm/lib/Analysis:

PostDominators.cpp updated: 1.48 -> 1.49
---
Log message:

Do not use the same variable name for two different variables in the
same scope.  This confused VC++ (and probably people too!).  Patch by
Morten Ofstad!


---
Diffs of the changes:  (+2 -3)

Index: llvm/lib/Analysis/PostDominators.cpp
diff -u llvm/lib/Analysis/PostDominators.cpp:1.48 llvm/lib/Analysis/PostDominators.cpp:1.49
--- llvm/lib/Analysis/PostDominators.cpp:1.48	Wed Sep  1 17:55:35 2004
+++ llvm/lib/Analysis/PostDominators.cpp	Thu Oct 14 09:59:16 2004
@@ -182,9 +182,8 @@
       // 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






More information about the llvm-commits mailing list