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 | eb44edad6dd492cb86864e2f75f0a19e962a82be (patch) | |
tree | 5ecc37877b9149bb4c6a6948a74e54a30fd5322a /clang/lib/Frontend/CompilerInstance.cpp | |
parent | c3312fab717fba32347df47b0a2dc5d1d6dd984e (diff) | |
download | bcm5719-llvm-eb44edad6dd492cb86864e2f75f0a19e962a82be.tar.gz bcm5719-llvm-eb44edad6dd492cb86864e2f75f0a19e962a82be.zip |
Don't collide loop variable names (to appease GCC)
llvm-svn: 145515
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index cb66aadfa99..c92d32ac7ef 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/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; } - |