diff options
Diffstat (limited to 'docs/Modules.rst')
| -rw-r--r-- | docs/Modules.rst | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/docs/Modules.rst b/docs/Modules.rst index 757be6191390..2fa38be6f493 100644 --- a/docs/Modules.rst +++ b/docs/Modules.rst @@ -859,10 +859,12 @@ express this with a single module map file in the library: module Foo { header "Foo.h" - - explicit module Private { - header "Foo_Private.h" - } + ... + } + + module Foo_Private { + header "Foo_Private.h" + ... } @@ -873,7 +875,7 @@ build machinery. Private module map files, which are named ``module.private.modulemap`` (or, for backward compatibility, ``module_private.map``), allow one to -augment the primary module map file with an additional submodule. For +augment the primary module map file with an additional modules. For example, we would split the module map file above into two module map files: @@ -883,9 +885,9 @@ files: module Foo { header "Foo.h" } - + /* module.private.modulemap */ - explicit module Foo.Private { + module Foo_Private { header "Foo_Private.h" } @@ -899,13 +901,12 @@ boundaries. When writing a private module as part of a *framework*, it's recommended that: -* Headers for this module are present in the ``PrivateHeaders`` - framework subdirectory. -* The private module is defined as a *submodule* of the public framework (if - there's one), similar to how ``Foo.Private`` is defined in the example above. -* The ``explicit`` keyword should be used to guarantee that its content will - only be available when the submodule itself is explicitly named (through a - ``@import`` for example). +* Headers for this module are present in the ``PrivateHeaders`` framework + subdirectory. +* The private module is defined as a *top level module* with the name of the + public framework prefixed, like ``Foo_Private`` above. Clang has extra logic + to work with this naming, using ``FooPrivate`` or ``Foo.Private`` (submodule) + trigger warnings and might not work as expected. Modularizing a Platform ======================= |
