From: Matt Beaumont-Gay Date: Wed, 30 Nov 2011 19:41:21 +0000 (+0000) Subject: Don't collide loop variable names (to appease GCC) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e25633f777cfcaa564b4ed36cec37d6e6e1ecb04;p=clang Don't collide loop variable names (to appease GCC) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145515 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index cb66aadfa9..c92d32ac7e 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -1214,17 +1214,17 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, llvm::SmallVector Best; unsigned BestEditDistance = (std::numeric_limits::max)(); - for (llvm::StringMap::iterator - I = Module->SubModules.begin(), - IEnd = Module->SubModules.end(); - I != IEnd; ++I) { - unsigned ED = Name.edit_distance(I->getValue()->Name, + for (llvm::StringMap::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 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, LastModuleImportResult = Module; return Module; } -