[Module map] Introduce a private module re-export directive.
authorDouglas Gregor <dgregor@apple.com>
Thu, 14 Sep 2017 23:38:44 +0000 (23:38 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 14 Sep 2017 23:38:44 +0000 (23:38 +0000)
commitf0b11de279e7ef31c36b7baa71f9b1b172591dab
tree64e76b91fbc5f49a9c08e46bb0236c4c3ff49cf9
parent672281a5116d255e8f18254301d907022f13e4df
[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
clang/docs/Modules.rst
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/include/clang/Basic/Module.h
clang/include/clang/Serialization/ASTBitCodes.h
clang/lib/Basic/Module.cpp
clang/lib/Lex/ModuleMap.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Modules/Inputs/export_as_test.modulemap [new file with mode: 0644]
clang/test/Modules/export_as_test.c [new file with mode: 0644]