From 70d78e035801a35c95c55384621724b0ef8ecb35 Mon Sep 17 00:00:00 2001 From: Chuanqi Xu Date: Mon, 20 Feb 2023 15:07:07 +0800 Subject: [PATCH] [NFC] Remove unused Sema::DirectModuleImports Sema::DirectModuleImports is not used now. Remove it for clearness. --- clang/include/clang/Sema/Sema.h | 7 ------- clang/lib/Sema/SemaModule.cpp | 5 ----- 2 files changed, 12 deletions(-) diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h index 3e177ba..a6b1102 100644 --- a/clang/include/clang/Sema/Sema.h +++ b/clang/include/clang/Sema/Sema.h @@ -2279,9 +2279,6 @@ private: /// The global module fragment of the current translation unit. clang::Module *GlobalModuleFragment = nullptr; - /// The modules we imported directly. - llvm::SmallPtrSet DirectModuleImports; - /// Namespace definitions that we will export when they finish. llvm::SmallPtrSet DeferredExportedNamespaces; @@ -2332,10 +2329,6 @@ public: return Entity->getOwningModule(); } - bool isModuleDirectlyImported(const Module *M) { - return DirectModuleImports.contains(M); - } - // Determine whether the module M belongs to the current TU. bool isModuleUnitOfCurrentTU(const Module *M) const; diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index f1c4090..f03d982 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -602,11 +602,6 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, Diag(ExportLoc, diag::err_export_not_in_module_interface); } - // In some cases we need to know if an entity was present in a directly- - // imported module (as opposed to a transitive import). This avoids - // searching both Imports and Exports. - DirectModuleImports.insert(Mod); - return Import; } -- 2.7.4