summaryrefslogtreecommitdiffstats
path: root/clang/docs/Modules.rst
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-09-27 21:23:28 +0000
committerDouglas Gregor <dgregor@apple.com>2013-09-27 21:23:28 +0000
commit30e9b6c47d8891b68f8cea1125987e4a0b8b6a82 (patch)
treebd84b65ba3d46f1a584165ac8986dd8dad8735f6 /clang/docs/Modules.rst
parent9e3c678040e678f5b4a4c5471dab99fe210889d1 (diff)
downloadbcm5719-llvm-30e9b6c47d8891b68f8cea1125987e4a0b8b6a82.tar.gz
bcm5719-llvm-30e9b6c47d8891b68f8cea1125987e4a0b8b6a82.zip
Note that modules are supported for C/Objective-C, and have syntax in ObjC.
llvm-svn: 191562
Diffstat (limited to 'clang/docs/Modules.rst')
-rw-r--r--clang/docs/Modules.rst27
1 files changed, 14 insertions, 13 deletions
diff --git a/clang/docs/Modules.rst b/clang/docs/Modules.rst
index 912cdafc8c3..bcb71c27d45 100644
--- a/clang/docs/Modules.rst
+++ b/clang/docs/Modules.rst
@@ -1,10 +1,10 @@
-======================
-Modules (EXPERIMENTAL)
-======================
+=======
+Modules
+=======
.. warning::
- The functionality described on this page is still experimental! Please
- try it out and send us bug reports!
+ The functionality described on this page is supported for C and
+ Objective-C. C++ support is experimental.
.. contents::
:local:
@@ -106,24 +106,25 @@ 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.
-Import declaration
-------------------
-The most direct way to import a module is with an *import declaration*, which imports the named module:
+Objective-C Import declaration
+------------------------------
+Objective-C provides syntax for importing a module via an *@import declaration*, which imports the named module:
.. parsed-literal::
- import std;
+ @import std;
-The import declaration above imports the entire contents of the ``std`` module (which would contain, e.g., the entire C or C++ standard library) and make its API available within the current translation unit. To import only part of a module, one may use dot syntax to specific a particular submodule, e.g.,
+The @import declaration above imports the entire contents of the ``std`` module (which would contain, e.g., the entire C or C++ standard library) and make its API available within the current translation unit. To import only part of a module, one may use dot syntax to specific a particular submodule, e.g.,
.. parsed-literal::
- import std.io;
+ @import std.io;
Redundant import declarations are ignored, and one is free to import modules at any point within the translation unit, so long as the import declaration is at global scope.
-.. warning::
- The import declaration syntax described here does not actually exist. Rather, it is a straw man proposal that may very well change when modules are discussed in the C and C++ committees. See the section `Includes as imports`_ to see how modules get imported today.
+At present, there is no C or C++ syntax for import declarations. Clang
+will track the modules proposal in the C++ committee. See the section
+`Includes as imports`_ to see how modules get imported today.
Includes as imports
-------------------
OpenPOWER on IntegriCloud