diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2011-11-30 19:41:21 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2011-11-30 19:41:21 +0000 |
commit | e25633f777cfcaa564b4ed36cec37d6e6e1ecb04 (patch) | |
tree | fc1612074d616c6231b8eb0dccc5e79cc53ef319 /lib/Frontend/CompilerInstance.cpp | |
parent | 4b7cac5d04dba8a6cda46ba05d6a79218557aa94 (diff) |
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
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
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<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 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc, LastModuleImportResult = Module; return Module; } - |