diff options
author | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2023-02-16 15:22:12 +0800 |
---|---|---|
committer | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2023-02-16 15:22:38 +0800 |
commit | 999ead9dc9080cf95445149e6dae1de087ef90b8 (patch) | |
tree | 7aa4e6aba58d6c01b986775e44053021b44702fa /clang/lib/Sema/SemaModule.cpp | |
parent | 612f3ac26f8cdb7487408b5541b224876564e57c (diff) | |
download | llvm-999ead9dc9080cf95445149e6dae1de087ef90b8.zip llvm-999ead9dc9080cf95445149e6dae1de087ef90b8.tar.gz llvm-999ead9dc9080cf95445149e6dae1de087ef90b8.tar.bz2 |
[Modules] Code cleanup after removing ModulesTS
Some codes become unused after we remove ModulesTS.
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r-- | clang/lib/Sema/SemaModule.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index 1fd1941..f1c4090 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -125,7 +125,6 @@ void Sema::HandleStartOfHeaderUnit() { ModuleScopes.back().BeginLoc = StartOfTU; ModuleScopes.back().Module = Mod; ModuleScopes.back().ModuleInterface = true; - ModuleScopes.back().IsPartition = false; VisibleModules.setVisible(Mod, StartOfTU); // From now on, we have an owning module for all declarations we see. @@ -373,7 +372,6 @@ Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleScopes.back().BeginLoc = StartLoc; ModuleScopes.back().Module = Mod; ModuleScopes.back().ModuleInterface = MDK != ModuleDeclKind::Implementation; - ModuleScopes.back().IsPartition = IsPartition; VisibleModules.setVisible(Mod, ModuleLoc); // From now on, we have an owning module for all declarations we see. @@ -601,9 +599,7 @@ DeclResult Sema::ActOnModuleImport(SourceLocation StartLoc, // [module.interface]p1: // An export-declaration shall inhabit a namespace scope and appear in the // purview of a module interface unit. - Diag(ExportLoc, diag::err_export_not_in_module_interface) - << (!ModuleScopes.empty() && - !ModuleScopes.back().ImplicitGlobalModuleFragment); + Diag(ExportLoc, diag::err_export_not_in_module_interface); } // In some cases we need to know if an entity was present in a directly- @@ -980,8 +976,6 @@ Module *Sema::PushGlobalModuleFragment(SourceLocation BeginLoc, // Enter the scope of the global module. ModuleScopes.push_back({BeginLoc, GlobalModuleFragment, /*ModuleInterface=*/false, - /*IsPartition=*/false, - /*ImplicitGlobalModuleFragment=*/IsImplicit, /*OuterVisibleModules=*/{}}); VisibleModules.setVisible(GlobalModuleFragment, BeginLoc); |