summaryrefslogtreecommitdiffstats
path: root/clang/docs/Modules.rst
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-10-24 20:23:01 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-10-24 20:23:01 +0000
commit202210b3694940b4e5cca50aa3b6208e0298121b (patch)
tree4979cefac81736c80c162bd4d1ad11a0833d8eba /clang/docs/Modules.rst
parent90a3b19e645143e320b8ea4b5ca348bc6fb34e94 (diff)
downloadbcm5719-llvm-202210b3694940b4e5cca50aa3b6208e0298121b.tar.gz
bcm5719-llvm-202210b3694940b4e5cca50aa3b6208e0298121b.zip
[modules] Support combining 'textual' with 'private'.
llvm-svn: 220589
Diffstat (limited to 'clang/docs/Modules.rst')
-rw-r--r--clang/docs/Modules.rst11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/docs/Modules.rst b/clang/docs/Modules.rst
index 439cb2445e7..df471a45fb8 100644
--- a/clang/docs/Modules.rst
+++ b/clang/docs/Modules.rst
@@ -445,9 +445,8 @@ A header declaration specifies that a particular header is associated with the e
.. parsed-literal::
*header-declaration*:
- ``umbrella``:sub:`opt` ``header`` *string-literal*
- ``private`` ``header`` *string-literal*
- ``textual`` ``header`` *string-literal*
+ ``private``:sub:`opt` ``textual``:sub:`opt` ``header`` *string-literal*
+ ``umbrella`` ``header`` *string-literal*
``exclude`` ``header`` *string-literal*
A header declaration that does not contain ``exclude`` nor ``textual`` specifies a header that contributes to the enclosing module. Specifically, when the module is built, the named header will be parsed and its declarations will be (logically) placed into the enclosing submodule.
@@ -464,14 +463,14 @@ A header with the ``private`` specifier may not be included from outside the mod
A header with the ``textual`` specifier will not be included when the module is built, and will be textually included if it is named by a ``#include`` directive. However, it is considered to be part of the module for the purpose of checking *use-declaration*\s.
-A header with the ``exclude`` specifier is excluded from the module. It will not be included when the module is built, nor will it be considered to be part of the module.
+A header with the ``exclude`` specifier is excluded from the module. It will not be included when the module is built, nor will it be considered to be part of the module, even if an ``umbrella`` header or directory would otherwise make it part of the module.
-**Example**: The C header ``assert.h`` is an excellent candidate for an excluded header, because it is meant to be included multiple times (possibly with different ``NDEBUG`` settings).
+**Example**: The C header ``assert.h`` is an excellent candidate for a textual header, because it is meant to be included multiple times (possibly with different ``NDEBUG`` settings). However, declarations within it should typically be split into a separate modular header.
.. parsed-literal::
module std [system] {
- exclude header "assert.h"
+ textual header "assert.h"
}
A given header shall not be referenced by more than one *header-declaration*.
OpenPOWER on IntegriCloud