diff options
| author | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 20:59:21 +0000 |
|---|---|---|
| committer | Aaron Ballman <aaron@aaronballman.com> | 2014-03-14 20:59:21 +0000 |
| commit | bbc3121301a82743b3635c4a1cf094c9c0c777e6 (patch) | |
| tree | b514ff9707430b5ac36fd7a894c850997c25e2f8 /clang/lib/Serialization | |
| parent | 4dd947aa02780750f22b3cef9f058711b5c6c583 (diff) | |
| download | bcm5719-llvm-bbc3121301a82743b3635c4a1cf094c9c0c777e6.tar.gz bcm5719-llvm-bbc3121301a82743b3635c4a1cf094c9c0c777e6.zip | |
[C++11] Removing the local_import_begin() and local_import_end() APIs and replacing with a range-only local_imports() API. Privatizes the iterator class as well.
llvm-svn: 203970
Diffstat (limited to 'clang/lib/Serialization')
| -rw-r--r-- | clang/lib/Serialization/ASTWriter.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp index 95a470d9223..b3332f96535 100644 --- a/clang/lib/Serialization/ASTWriter.cpp +++ b/clang/lib/Serialization/ASTWriter.cpp @@ -2204,9 +2204,7 @@ void ASTWriter::WriteSubmodules(Module *WritingModule) { // other consumers of this information. SourceManager &SrcMgr = PP->getSourceManager(); ModuleMap &ModMap = PP->getHeaderSearchInfo().getModuleMap(); - for (ASTContext::import_iterator I = Context->local_import_begin(), - IEnd = Context->local_import_end(); - I != IEnd; ++I) { + for (const auto *I : Context->local_imports()) { if (Module *ImportedFrom = ModMap.inferModuleFromLocation(FullSourceLoc(I->getLocation(), SrcMgr))) { @@ -4276,9 +4274,7 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, if (!WritingModule) { // Write the submodules that were imported, if any. RecordData ImportedModules; - for (ASTContext::import_iterator I = Context.local_import_begin(), - IEnd = Context.local_import_end(); - I != IEnd; ++I) { + for (const auto *I : Context.local_imports()) { assert(SubmoduleIDs.find(I->getImportedModule()) != SubmoduleIDs.end()); ImportedModules.push_back(SubmoduleIDs[I->getImportedModule()]); } |

