aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2022-06-03 10:43:38 +0100
committerIain Sandoe <iain@sandoe.co.uk>2023-03-29 08:52:28 +0530
commit6e4f870a21e344fdcd61fe613b0aeeafb8a84ed2 (patch)
treea6e16ee5cb1e7c71a5ab467dac93617bb1731535 /clang/lib/Frontend
parent279c7a2f17937836ed13e359c3fb381bef7defaf (diff)
downloadllvm-6e4f870a21e344fdcd61fe613b0aeeafb8a84ed2.zip
llvm-6e4f870a21e344fdcd61fe613b0aeeafb8a84ed2.tar.gz
llvm-6e4f870a21e344fdcd61fe613b0aeeafb8a84ed2.tar.bz2
re-land [C++20][Modules] Introduce an implementation module.
We need to be able to distinguish individual TUs from the same module in cases where TU-local entities either need to be hidden (or, for some cases of ADL in template instantiation, need to be detected as exposures). This creates a module type for the implementation which implicitly imports its primary module interface per C++20: [module.unit/8] 'A module-declaration that contains neither an export-keyword nor a module-partition implicitly imports the primary module interface unit of the module as if by a module-import-declaration. Implementation modules are never serialized (-emit-module-interface for an implementation unit is diagnosed and rejected). Differential Revision: https://reviews.llvm.org/D126959
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/FrontendActions.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp
index 2aae41f..05d9fc82 100644
--- a/clang/lib/Frontend/FrontendActions.cpp
+++ b/clang/lib/Frontend/FrontendActions.cpp
@@ -759,6 +759,8 @@ static StringRef ModuleKindName(Module::ModuleKind MK) {
return "Module Map Module";
case Module::ModuleInterfaceUnit:
return "Interface Unit";
+ case Module::ModuleImplementationUnit:
+ return "Implementation Unit";
case Module::ModulePartitionInterface:
return "Partition Interface";
case Module::ModulePartitionImplementation: