summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-10-17 01:26:52 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-10-17 01:26:52 +0000
commitd963ca6739ad59d70a2cbae43a7f23eed335f746 (patch)
tree0539b7f7931629276a6565b142f1615e7b2ed71d
parentc9855da6d937047b0a367aa116e9ac8dda708062 (diff)
downloadbcm5719-llvm-d963ca6739ad59d70a2cbae43a7f23eed335f746.tar.gz
bcm5719-llvm-d963ca6739ad59d70a2cbae43a7f23eed335f746.zip
Switch to range-based for loop. No functionality change.
llvm-svn: 220014
-rw-r--r--clang/lib/Lex/HeaderSearch.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index 4472ca6ab22..bdec26fa521 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/lib/Lex/HeaderSearch.cpp
@@ -575,15 +575,9 @@ const FileEntry *HeaderSearch::LookupFile(
// that they describe. These cannot be loaded lazily upon encountering a
// header file, as there is no other known mapping from a header file to its
// module map file.
- for (llvm::SetVector<std::string>::iterator
- I = HSOpts->ModuleMapFiles.begin(),
- E = HSOpts->ModuleMapFiles.end();
- I != E; ++I) {
- const FileEntry *File = FileMgr.getFile(*I);
- if (!File)
- continue;
- loadModuleMapFile(File, /*IsSystem=*/false);
- }
+ for (const auto &Filename : HSOpts->ModuleMapFiles)
+ if (const FileEntry *File = FileMgr.getFile(Filename))
+ loadModuleMapFile(File, /*IsSystem=*/false);
HSOpts->ModuleMapFiles.clear();
}
OpenPOWER on IntegriCloud