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

Chris Lattner lattner at cs.uiuc.edu
Sun Jan 30 16:11:14 PST 2005



Changes in directory llvm/lib/Analysis/DataStructure:

CompleteBottomUp.cpp updated: 1.16 -> 1.17
DataStructure.cpp updated: 1.187 -> 1.188
---
Log message:

Rename variables to work with VC++'s hokey scoping rules.


---
Diffs of the changes:  (+10 -9)

 CompleteBottomUp.cpp |    5 +++--
 DataStructure.cpp    |   14 +++++++-------
 2 files changed, 10 insertions(+), 9 deletions(-)


Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp
diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.16 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.17
--- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.16	Sun Jan 30 17:51:00 2005
+++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp	Sun Jan 30 18:10:58 2005
@@ -122,7 +122,8 @@
   Stack.push_back(&FG);
 
   // The edges out of the current node are the call site targets...
-  for (DSGraph::fc_iterator CI = FG.fc_begin(), E = FG.fc_end(); CI != E; ++CI){
+  for (DSGraph::fc_iterator CI = FG.fc_begin(), CE = FG.fc_end();
+       CI != CE; ++CI) {
     Instruction *Call = CI->getCallSite().getInstruction();
 
     // Loop over all of the actually called functions...
@@ -185,7 +186,7 @@
 
   // The edges out of the current node are the call site targets...
   unsigned i = 0;
-  for (DSGraph::fc_iterator CI = G.fc_begin(), E = G.fc_end(); CI != E;
+  for (DSGraph::fc_iterator CI = G.fc_begin(), CE = G.fc_end(); CI != CE;
        ++CI, ++i) {
     const DSCallSite &CS = *CI;
     Instruction *TheCall = CS.getCallSite().getInstruction();


Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.187 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.188
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.187	Sun Jan 30 17:51:01 2005
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp	Sun Jan 30 18:10:58 2005
@@ -1595,17 +1595,17 @@
   Calls.sort();
 
   // Now that we are in sorted order, eliminate duplicates.
-  std::list<DSCallSite>::iterator I = Calls.begin(), E = Calls.end();
-  if (I != E)
+  std::list<DSCallSite>::iterator CI = Calls.begin(), CE = Calls.end();
+  if (CI != CE)
     while (1) {
-      std::list<DSCallSite>::iterator OldIt = I++;
-      if (I == E) break;
+      std::list<DSCallSite>::iterator OldIt = CI++;
+      if (CI == CE) break;
 
       // If this call site is now the same as the previous one, we can delete it
       // as a duplicate.
-      if (*OldIt == *I) {
-        Calls.erase(I);
-        I = OldIt;
+      if (*OldIt == *CI) {
+        Calls.erase(CI);
+        CI = OldIt;
         ++NumDeleted;
       }
     }






More information about the llvm-commits mailing list