Author: Chuanqi Xu Date: 2023-09-07T16:12:53+08:00 New Revision: f0cd9b2b8a09192489e0aedf3c9af3a540ea5966
URL: https://github.com/llvm/llvm-project/commit/f0cd9b2b8a09192489e0aedf3c9af3a540ea5966 DIFF: https://github.com/llvm/llvm-project/commit/f0cd9b2b8a09192489e0aedf3c9af3a540ea5966.diff LOG: [NFC] [Serialization] Remove unused output parameter 'Imported' in ReadAST Added: Modified: clang/include/clang/Serialization/ASTReader.h clang/lib/Serialization/ASTReader.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Serialization/ASTReader.h b/clang/include/clang/Serialization/ASTReader.h index 739f7399895e1e..2d114fc8d4e41e 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<serialization::DeclID, 4> 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<ImportedSubmodule> *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 22bc40a9ce7bae..faeea6685ab95d 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<ImportedSubmodule> *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. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits