[clang] 70d78e0 - [NFC] Remove unused Sema::DirectModuleImports
Chuanqi Xu via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 19 23:08:26 PST 2023
Author: Chuanqi Xu
Date: 2023-02-20T15:07:49+08:00
New Revision: 70d78e035801a35c95c55384621724b0ef8ecb35
URL: https://github.com/llvm/llvm-project/commit/70d78e035801a35c95c55384621724b0ef8ecb35
DIFF: https://github.com/llvm/llvm-project/commit/70d78e035801a35c95c55384621724b0ef8ecb35.diff
LOG: [NFC] Remove unused Sema::DirectModuleImports
Sema::DirectModuleImports is not used now. Remove it for clearness.
Added:
Modified:
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaModule.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Sema/Sema.h b/clang/include/clang/Sema/Sema.h
index 3e177bae99c5..a6b1102488ae 100644
--- a/clang/include/clang/Sema/Sema.h
+++ b/clang/include/clang/Sema/Sema.h
@@ -2279,9 +2279,6 @@ class Sema final {
/// The global module fragment of the current translation unit.
clang::Module *GlobalModuleFragment = nullptr;
- /// The modules we imported directly.
- llvm::SmallPtrSet<clang::Module *, 8> DirectModuleImports;
-
/// Namespace definitions that we will export when they finish.
llvm::SmallPtrSet<const NamespaceDecl*, 8> DeferredExportedNamespaces;
@@ -2332,10 +2329,6 @@ class Sema final {
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 f1c409078f41..f03d98210b5b 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;
}
More information about the cfe-commits
mailing list