[cfe-commits] r145515 - /cfe/trunk/lib/Frontend/CompilerInstance.cpp

Matt Beaumont-Gay matthewbg at google.com
Wed Nov 30 11:41:21 PST 2011


Author: matthewbg
Date: Wed Nov 30 13:41:21 2011
New Revision: 145515

URL: http://llvm.org/viewvc/llvm-project?rev=145515&view=rev
Log:
Don't collide loop variable names (to appease GCC)

Modified:
    cfe/trunk/lib/Frontend/CompilerInstance.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=145515&r1=145514&r2=145515&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Wed Nov 30 13:41:21 2011
@@ -1214,17 +1214,17 @@
         llvm::SmallVector<StringRef, 2> Best;
         unsigned BestEditDistance = (std::numeric_limits<unsigned>::max)();
         
-        for (llvm::StringMap<ModuleMap::Module *>::iterator 
-                  I = Module->SubModules.begin(), 
-               IEnd = Module->SubModules.end();
-             I != IEnd; ++I) {
-          unsigned ED = Name.edit_distance(I->getValue()->Name,
+        for (llvm::StringMap<ModuleMap::Module *>::iterator
+                  J = Module->SubModules.begin(), 
+               JEnd = Module->SubModules.end();
+             J != JEnd; ++J) {
+          unsigned ED = Name.edit_distance(J->getValue()->Name,
                                            /*AllowReplacements=*/true,
                                            BestEditDistance);
           if (ED <= BestEditDistance) {
             if (ED < BestEditDistance)
               Best.clear();
-            Best.push_back(I->getValue()->Name);
+            Best.push_back(J->getValue()->Name);
           }
         }
         
@@ -1259,4 +1259,3 @@
   LastModuleImportResult = Module;
   return Module;
 }
-





More information about the cfe-commits mailing list