diff options
author | Douglas Gregor <dgregor@apple.com> | 2017-09-14 23:38:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2017-09-14 23:38:44 +0000 |
commit | 763bd9136e59e77b6fbc68841855632547dd9882 (patch) | |
tree | 3cefa9524cd398c951742b04d39575f702b3dfa0 /lib/Serialization/ASTReader.cpp | |
parent | 36a127d6c7d12bc3cf47378798ea52e835be040b (diff) | |
download | clang-763bd9136e59e77b6fbc68841855632547dd9882.tar.gz |
[Module map] Introduce a private module re-export directive.
Introduce a new "export_as" directive for top-level modules, which
indicates that the current module is a "private" module whose symbols
will eventually be exported through the named "public" module. This is
in support of a common pattern in the Darwin ecosystem where a single
public framework is constructed of several private frameworks, with
(currently) header duplication and some support from the linker.
Addresses rdar://problem/34438420.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@313316 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReader.cpp')
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 3dba299790..46823030d3 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -5123,7 +5123,7 @@ ASTReader::ReadSubmoduleBlock(ModuleFile &F, unsigned ClientLoadCapabilities) { break; } - case SUBMODULE_INITIALIZERS: + case SUBMODULE_INITIALIZERS: { if (!ContextObj) break; SmallVector<uint32_t, 16> Inits; @@ -5132,6 +5132,11 @@ ASTReader::ReadSubmoduleBlock(ModuleFile &F, unsigned ClientLoadCapabilities) { ContextObj->addLazyModuleInitializers(CurrentModule, Inits); break; } + + case SUBMODULE_EXPORT_AS: + CurrentModule->ExportAsModule = Blob.str(); + break; + } } } |