diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h index 739f7399895e1..2d114fc8d4e41 100644 --- a/clang/include/clang/Serialization/ASTReader.h +++ b/clang/include/clang/Serialization/ASTReader.h @@ -939,7 +939,7 @@ class ASTReader /// Sema tracks these to emit deferred diags. llvm::SmallSetVector DeclsToCheckForDeferredDiags; -public: +private: struct ImportedSubmodule { serialization::SubmoduleID ID; SourceLocation ImportLoc; @@ -948,7 +948,6 @@ class ASTReader : ID(ID), ImportLoc(ImportLoc) {} }; -private: /// A list of modules that were imported by precompiled headers or /// any other non-module AST file and have not yet been made visible. If a /// module is made visible in the ASTReader, it will be transfered to @@ -1633,13 +1632,9 @@ class ASTReader /// \param ClientLoadCapabilities The set of client load-failure /// capabilities, represented as a bitset of the enumerators of /// LoadFailureCapabilities. - /// - /// \param Imported optional out-parameter to append the list of modules - /// that were imported by precompiled headers or any other non-module AST file ASTReadResult ReadAST(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, - unsigned ClientLoadCapabilities, - SmallVectorImpl *Imported = nullptr); + unsigned ClientLoadCapabilities); /// Make the entities in the given module and any of its (non-explicit) /// submodules visible to name lookup. diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 22bc40a9ce7ba..faeea6685ab95 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -4314,8 +4314,7 @@ static bool SkipCursorToBlock(BitstreamCursor &Cursor, unsigned BlockID) { ASTReader::ASTReadResult ASTReader::ReadAST(StringRef FileName, ModuleKind Type, SourceLocation ImportLoc, - unsigned ClientLoadCapabilities, - SmallVectorImpl *Imported) { + unsigned ClientLoadCapabilities) { llvm::TimeTraceScope scope("ReadAST", FileName); llvm::SaveAndRestore SetCurImportLocRAII(CurrentImportLoc, ImportLoc); @@ -4506,10 +4505,6 @@ ASTReader::ASTReadResult ASTReader::ReadAST(StringRef FileName, } UnresolvedModuleRefs.clear(); - if (Imported) - Imported->append(PendingImportedModules.begin(), - PendingImportedModules.end()); - // FIXME: How do we load the 'use'd modules? They may not be submodules. // Might be unnecessary as use declarations are only used to build the // module itself.