Skip to content

Commit 095e002

Browse files
committed
[docs] Fix the use of "dependent" and "dependant" in the C++ Modules Doc
"Dependant BMI" / "Dependent BMI" was used incorrectly in the documentation: "Dependent BMI" refers to a BMI that depends on the current TU, but it was used for the BMI that current TU depends on. I replaced all the mentions with "BMI dependency".
1 parent 56f5bcb commit 095e002

File tree

1 file changed

+18
-19
lines changed

1 file changed

+18
-19
lines changed

clang/docs/StandardCPlusPlusModules.rst

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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

313313
1. ``-fprebuilt-module-path=<path/to/directory>``.
314314
2. ``-fmodule-file=<path/to/BMI>`` (Deprecated).
315315
3. ``-fmodule-file=<module-name>=<path/to/BMI>``.
316316

317317
The ``-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
319319
specify a search path for header files. When importing a module ``M``, the
320320
compiler 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

344343
When compiling a ``module implementation unit``, the BMI of the corresponding
345344
``primary module interface unit`` must be specified because a module
@@ -1192,14 +1191,14 @@ them to ``your_library_imported.h`` too.
11921191
Importing 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
12031202
provide modules.
12041203

12051204
Headers need to be converted to include third-party headers conditionally. Then,
@@ -1260,8 +1259,8 @@ Non-exported ``using`` declarations are unnecessary if using implementation
12601259
module units. Instead, third-party modules can be imported directly in
12611260
implementation module units.
12621261

1263-
Partial dependent libraries providing modules
1264-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1262+
Partial library dependencies providing modules
1263+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12651264

12661265
If the library has to mix the use of ``include`` and ``import`` in its module,
12671266
the primary goal is still the removal of duplicated declarations in translation
@@ -1562,11 +1561,11 @@ 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

15711570
With the existing implementation, ``-fprebuilt-module-path`` cannot be used for
15721571
header units (because they are nominally anonymous). For header units, use

0 commit comments

Comments
 (0)