aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/Module.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-03-06 15:34:37 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2024-03-06 15:46:55 +0800
commitd3df2a834cf6febb44c699d109b9e7f622194837 (patch)
treee3608172efc23d01d0b77bf91b9c6e01a52d3573 /clang/lib/Basic/Module.cpp
parentd3e79e4cc33b89c61a8763a130f60a443eed4775 (diff)
downloadllvm-d3df2a834cf6febb44c699d109b9e7f622194837.zip
llvm-d3df2a834cf6febb44c699d109b9e7f622194837.tar.gz
llvm-d3df2a834cf6febb44c699d109b9e7f622194837.tar.bz2
[C++20] [Modules] Handle transitive import in the module properly
Close https://github.com/llvm/llvm-project/issues/84002 Per [module.import]p7: > Additionally, when a module-import-declaration in a module unit of > some module M imports another module unit U of M, it also imports all > translation units imported by non-exported module-import-declarations > in the module unit purview of U. However, we only tried to implement it during the implicit import of primary module interface for module implementation unit. Also we didn't implement the last sentence from [module.import]p7 completely: > These rules can in turn lead to the importation of yet more > translation units. This patch tries to care the both issues.
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r--clang/lib/Basic/Module.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp
index 1c5043a..9f597dc 100644
--- a/clang/lib/Basic/Module.cpp
+++ b/clang/lib/Basic/Module.cpp
@@ -722,14 +722,6 @@ void VisibleModuleSet::setVisible(Module *M, SourceLocation Loc,
VisitModule({M, nullptr});
}
-void VisibleModuleSet::makeTransitiveImportsVisible(Module *M,
- SourceLocation Loc,
- VisibleCallback Vis,
- ConflictCallback Cb) {
- for (auto *I : M->Imports)
- setVisible(I, Loc, Vis, Cb);
-}
-
ASTSourceDescriptor::ASTSourceDescriptor(Module &M)
: Signature(M.Signature), ClangModule(&M) {
if (M.Directory)