summaryrefslogtreecommitdiffstats
path: root/clang/docs/Modules.rst
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-10-28 22:18:19 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-10-28 22:18:19 +0000
commita3feee2ad64b6604bcb35c27a35307bf470accd1 (patch)
treeddad19dc3de6eb67785751a907c8cfc504a217f7 /clang/docs/Modules.rst
parentd1cac0af6bef8496955bf2222e285c0ee46ded74 (diff)
downloadbcm5719-llvm-a3feee2ad64b6604bcb35c27a35307bf470accd1.tar.gz
bcm5719-llvm-a3feee2ad64b6604bcb35c27a35307bf470accd1.zip
Allow a new syntax in a module requires-declaration:
requires ! feature The purpose of this is to allow (for instance) the module map for /usr/include to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are instead provided by the C++ standard library in this case, and the glibc C <tgmath.h> header would otherwise try to include <complex.h>, resulting in a module cycle). llvm-svn: 193549
Diffstat (limited to 'clang/docs/Modules.rst')
-rw-r--r--clang/docs/Modules.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/docs/Modules.rst b/clang/docs/Modules.rst
index bcb71c27d45..9fb4c774874 100644
--- a/clang/docs/Modules.rst
+++ b/clang/docs/Modules.rst
@@ -320,9 +320,12 @@ A *requires-declaration* specifies the requirements that an importing translatio
``requires`` *feature-list*
*feature-list*:
- *identifier* (',' *identifier*)*
+ *feature* (',' *feature*)*
+
+ *feature*:
+ ``!``:sub:`opt` *identifier*
-The requirements clause allows specific modules or submodules to specify that they are only accessible with certain language dialects or on certain platforms. The feature list is a set of identifiers, defined below. If any of the features is not available in a given translation unit, that translation unit shall not import the module.
+The requirements clause allows specific modules or submodules to specify that they are only accessible with certain language dialects or on certain platforms. The feature list is a set of identifiers, defined below. If any of the features is not available in a given translation unit, that translation unit shall not import the module. The optional ``!`` indicates that a feature is incompatible with the module.
The following features are defined:
OpenPOWER on IntegriCloud