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 | f0b11de279e7ef31c36b7baa71f9b1b172591dab (patch) | |
tree | 64e76b91fbc5f49a9c08e46bb0236c4c3ff49cf9 /clang/lib/Basic/Module.cpp | |
parent | 672281a5116d255e8f18254301d907022f13e4df (diff) | |
download | llvm-f0b11de279e7ef31c36b7baa71f9b1b172591dab.zip llvm-f0b11de279e7ef31c36b7baa71f9b1b172591dab.tar.gz llvm-f0b11de279e7ef31c36b7baa71f9b1b172591dab.tar.bz2 |
[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.
llvm-svn: 313316
Diffstat (limited to 'clang/lib/Basic/Module.cpp')
-rw-r--r-- | clang/lib/Basic/Module.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Basic/Module.cpp b/clang/lib/Basic/Module.cpp index 1d96afd..621b1b2 100644 --- a/clang/lib/Basic/Module.cpp +++ b/clang/lib/Basic/Module.cpp @@ -440,6 +440,11 @@ void Module::print(raw_ostream &OS, unsigned Indent) const { } } + if (!ExportAsModule.empty()) { + OS.indent(Indent + 2); + OS << "export_as" << ExportAsModule << "\n"; + } + for (submodule_const_iterator MI = submodule_begin(), MIEnd = submodule_end(); MI != MIEnd; ++MI) // Print inferred subframework modules so that we don't need to re-infer |