summaryrefslogtreecommitdiffstats
path: root/clang/docs/Modules.rst
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-09-30 23:10:19 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-09-30 23:10:19 +0000
commitffb650856d48262ac78c1eb61f634f528c6a35d1 (patch)
treef046d3c1e37c95f95e84924650a056b53395e618 /clang/docs/Modules.rst
parent12dee62b0283d8b9df96123effd2fdfc1e630910 (diff)
downloadbcm5719-llvm-ffb650856d48262ac78c1eb61f634f528c6a35d1.tar.gz
bcm5719-llvm-ffb650856d48262ac78c1eb61f634f528c6a35d1.zip
Enable both C and C++ modules with -fmodules, by switching -fcxx-modules to
being on by default. -fno-cxx-modules can still be used to enable C modules but not C++ modules, but C++ modules is not significantly less stable than C modules any more. Also remove some of the scare words from the modules documentation. We're certainly not going to remove modules support (though we might change the interface), and it works well enough to bootstrap and build lots of non-trivial code. Note that this does not represent a commitment to the current interface nor implementation, and we still intend to follow whatever direction the C and C++ committees take regarding modules support. llvm-svn: 218717
Diffstat (limited to 'clang/docs/Modules.rst')
-rw-r--r--clang/docs/Modules.rst21
1 files changed, 8 insertions, 13 deletions
diff --git a/clang/docs/Modules.rst b/clang/docs/Modules.rst
index f47b6ace091..110a77b5dae 100644
--- a/clang/docs/Modules.rst
+++ b/clang/docs/Modules.rst
@@ -2,10 +2,6 @@
Modules
=======
-.. warning::
- The functionality described on this page is supported for C and
- Objective-C. C++ support is experimental.
-
.. contents::
:local:
@@ -104,7 +100,7 @@ Many programming languages have a module or package system, and because of the v
Using Modules
=============
-To enable modules, pass the command-line flag ``-fmodules`` [#]_. This will make any modules-enabled software libraries available as modules as well as introducing any modules-specific syntax. Additional `command-line parameters`_ are described in a separate section later.
+To enable modules, pass the command-line flag ``-fmodules``. This will make any modules-enabled software libraries available as modules as well as introducing any modules-specific syntax. Additional `command-line parameters`_ are described in a separate section later.
Objective-C Import declaration
------------------------------
@@ -163,13 +159,10 @@ Modules maintain references to each of the headers that were part of the module
Command-line parameters
-----------------------
``-fmodules``
- Enable the modules feature (EXPERIMENTAL).
-
-``-fcxx-modules``
- Enable the modules feature for C++ (EXPERIMENTAL).
+ Enable the modules feature.
``-fmodule-maps``
- Enable interpretation of module maps (EXPERIMENTAL). This option is implied by ``-fmodules``.
+ Enable interpretation of module maps. This option is implied by ``-fmodules``.
``-fmodules-cache-path=<directory>``
Specify the path to the modules cache. If not provided, Clang will select a system-appropriate default.
@@ -240,6 +233,10 @@ The ``#undef`` overrides the ``#define``, and a source file that imports both mo
Module Map Language
===================
+.. warning::
+
+ The module map language is not currently guaranteed to be stable between major revisions of Clang.
+
The module map language describes the mapping from header files to the
logical structure of modules. To enable support for using a library as
a module, one must write a ``module.modulemap`` file for that library. The
@@ -826,7 +823,7 @@ To detect and help address some of these problems, the ``clang-tools-extra`` rep
Future Directions
=================
-Modules is an experimental feature, and there is much work left to do to make it both real and useful. Here are a few ideas:
+Modules support is under active development, and there are many opportunities remaining to improve it. Here are a few ideas:
**Detect unused module imports**
Unlike with ``#include`` directives, it should be fairly simple to track whether a directly-imported module has ever been used. By doing so, Clang can emit ``unused import`` or ``unused #include`` diagnostics, including Fix-Its to remove the useless imports/includes.
@@ -858,8 +855,6 @@ PCHInternals_
.. [#] Automatic linking against the libraries of modules requires specific linker support, which is not widely available.
-.. [#] Modules are only available in C and Objective-C; a separate flag ``-fcxx-modules`` enables modules support for C++, which is even more experimental and broken.
-
.. [#] There are certain anti-patterns that occur in headers, particularly system headers, that cause problems for modules. The section `Modularizing a Platform`_ describes some of them.
.. [#] The second instance is actually a new thread within the current process, not a separate process. However, the original compiler instance is blocked on the execution of this thread.
OpenPOWER on IntegriCloud