@@ -305,17 +305,17 @@ Therefore, none of the following names are valid by default:
305305 Using a reserved module name is strongly discouraged, but
306306``-Wno-reserved-module-identifier `` can be used to suppress the warning.
307307
308- Specifying dependent BMIs
309- ~~~~~~~~~~~~~~~~~~~~~~~~~
308+ Specifying BMI dependencies
309+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
310310
311- There are 3 ways to specify a dependent BMI:
311+ There are 3 ways to specify a BMI dependency :
312312
3133131. ``-fprebuilt-module-path=<path/to/directory> ``.
3143142. ``-fmodule-file=<path/to/BMI> `` (Deprecated).
3153153. ``-fmodule-file=<module-name>=<path/to/BMI> ``.
316316
317317The ``-fprebuilt-module-path `` option specifies the path to search for
318- dependent BMIs . Multiple paths may be specified, similar to using ``-I `` to
318+ BMI dependencies . Multiple paths may be specified, similar to using ``-I `` to
319319specify a search path for header files. When importing a module ``M ``, the
320320compiler looks for ``M.pcm `` in the directories specified by
321321``-fprebuilt-module-path ``. Similarly, when importing a partition module unit
@@ -337,9 +337,8 @@ When these options are specified in the same invocation of the compiler, the
337337``-fmodule-file=<module-name>=<path/to/BMI> ``, which takes precedence over
338338``-fprebuilt-module-path=<path/to/directory> ``.
339339
340- Note: all dependant BMIs must be specified explicitly, either directly or
341- indirectly dependent BMIs explicitly. See
342- https://github.com/llvm/llvm-project/issues/62707 for details.
340+ Note: all BMI dependencies must be specified explicitly, either directly or
341+ indirectly. See https://github.com/llvm/llvm-project/issues/62707 for details.
343342
344343When compiling a ``module implementation unit ``, the BMI of the corresponding
345344``primary module interface unit `` must be specified because a module
@@ -380,7 +379,7 @@ For example, the traditional compilation processes for headers are like:
380379 hdr2.h --, |
381380 src2.cpp -+> clang++ src2.cpp --> src2.o ---'
382381
383- And the compilation process for module units are like:
382+ And the compilation processes for module units are like:
384383
385384.. code-block :: text
386385
@@ -435,7 +434,7 @@ non-module-unit uses need to be consistent. Consider the following example:
435434 $ clang++ -std=c++23 Use.cpp -fprebuilt-module-path=.
436435
437436 Clang rejects the example due to the inconsistent language standard modes. Not
438- all compiler options are language dialect options, though. For example:
437+ all compiler options are language- dialect options, though. For example:
439438
440439.. code-block :: console
441440
@@ -465,7 +464,7 @@ translation units.
465464Source Files Consistency
466465^^^^^^^^^^^^^^^^^^^^^^^^
467466
468- Clang may open the input files\ :sup: `1`` of a BMI during the compilation. This implies that
467+ Clang may open the input files [ 1 ]_ of a BMI during the compilation. This implies that
469468when Clang consumes a BMI, all the input files need to be present in the original path
470469and with the original contents.
471470
@@ -477,21 +476,21 @@ When the ``-fmodules-embed-all-files`` flag are enabled, Clang explicitly emits
477476code into the BMI file, the contents of the BMI file contain a sufficiently verbose
478477representation to reproduce the original source file.
479478
480- :sup: `1`` Input files: The source files which took part in the compilation of the BMI.
481- For example:
479+ .. [ 1 ] Input files: The source files which took part in the compilation of the BMI.
480+ For example:
482481
483- .. code-block :: c++
482+ .. code-block :: c++
484483
485- // M.cppm
486- module;
487- #include "foo.h"
488- export module M;
484+ // M.cppm
485+ module;
486+ #include "foo.h"
487+ export module M;
489488
490- // foo.h
491- #pragma once
492- #include "bar.h"
489+ // foo.h
490+ #pragma once
491+ #include "bar.h"
493492
494- The ``M.cppm ``, ``foo.h `` and ``bar.h `` are input files for the BMI of ``M.cppm ``.
493+ The ``M.cppm ``, ``foo.h `` and ``bar.h `` are input files for the BMI of ``M.cppm ``.
495494
496495 Object definition consistency
497496^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -781,8 +780,8 @@ for the BMI being produced. This ensures that build systems are not required to
781780transitively imported modules when deciding whether to recompile.
782781
783782What is considered to be a potential contributory BMIs is currently unspecified.
784- However, it is a severe bug for a BMI to remain unchanged following an observable change
785- that affects its consumers.
783+ However, it is a severe bug for a BMI to remain unchanged following an
784+ observable change in the module source files that affects the module consumers.
786785
787786Build systems may utilize this optimization by doing an update-if-changed operation to the BMI
788787that is consumed from the BMI that is output by the compiler.
@@ -1192,14 +1191,14 @@ them to ``your_library_imported.h`` too.
11921191Importing modules
11931192~~~~~~~~~~~~~~~~~
11941193
1195- When there are dependent libraries providing modules, they should be imported
1196- in your module as well. Many existing libraries will fall into this category
1197- once the ``std `` module is more widely available.
1194+ When there are library dependencies providing modules, the module dependencies
1195+ should be imported in your module as well. Many existing libraries will fall
1196+ into this category once the ``std `` module is more widely available.
11981197
1199- All dependent libraries providing modules
1200- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1198+ All library dependencies providing modules
1199+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12011200
1202- Of course, most of the complexity disappears if all the dependent libraries
1201+ Of course, most of the complexity disappears if all the library dependencies
12031202provide modules.
12041203
12051204Headers need to be converted to include third-party headers conditionally. Then,
@@ -1260,8 +1259,8 @@ Non-exported ``using`` declarations are unnecessary if using implementation
12601259module units. Instead, third-party modules can be imported directly in
12611260implementation module units.
12621261
1263- Partial dependent libraries providing modules
1264- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1262+ Partial library dependencies providing modules
1263+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12651264
12661265If the library has to mix the use of ``include `` and ``import `` in its module,
12671266the primary goal is still the removal of duplicated declarations in translation
@@ -1562,17 +1561,17 @@ file as a header. For example:
15621561 $ clang++ -std=c++20 -fmodule-header=system -xc++-header iostream -o iostream.pcm
15631562 $ clang++ -std=c++20 -fmodule-file=iostream.pcm use.cpp
15641563
1565- How to specify dependent BMIs
1566- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1564+ How to specify BMI dependencies
1565+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15671566
1568- ``-fmodule-file `` can be used to specify a dependent BMI (or multiple times for
1569- more than one dependent BMI).
1567+ ``-fmodule-file `` can be used to specify a BMI dependency (or multiple times for
1568+ more than one BMI dependency ).
15701569
15711570With the existing implementation, ``-fprebuilt-module-path `` cannot be used for
15721571header units (because they are nominally anonymous). For header units, use
15731572``-fmodule-file `` to include the relevant PCM file for each header unit.
15741573
1575- This is expect to be solved in a future version of Clang either by the compiler
1574+ This is expected to be solved in a future version of Clang either by the compiler
15761575finding and specifying ``-fmodule-file `` automatically, or by the use of a
15771576module-mapper that understands how to map the header name to their PCMs.
15781577
0 commit comments