================ @@ -312,75 +300,76 @@ So all of the following name is not valid by default: __test // and so on ... -If you still want to use the reserved module names for any reason, use -``-Wno-reserved-module-identifier`` to suppress the warning. +Using a reserved module name is strongly discouraged, but +``-Wno-reserved-module-identifier`` can be used to suppress the warning. -How to specify the dependent BMIs -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Specifying dependent BMIs +~~~~~~~~~~~~~~~~~~~~~~~~~ -There are 3 methods to specify the dependent BMIs: +There are 3 ways to specify a dependent BMI: -* (1) ``-fprebuilt-module-path=<path/to/directory>``. -* (2) ``-fmodule-file=<path/to/BMI>`` (Deprecated). -* (3) ``-fmodule-file=<module-name>=<path/to/BMI>``. +1. ``-fprebuilt-module-path=<path/to/directory>``. +2. ``-fmodule-file=<path/to/BMI>`` (Deprecated). +3. ``-fmodule-file=<module-name>=<path/to/BMI>``. -The option ``-fprebuilt-module-path`` tells the compiler the path where to search for dependent BMIs. -It may be used multiple times just like ``-I`` for specifying paths for header files. The look up rule here is: +The ``-fprebuilt-module-path`` option specifies the path to search for +dependent BMIs. Multiple paths may be specified, similar to using ``-I`` to +specify a search path for header files. When importing a module ``M``, the +compiler looks for ``M.pcm`` in the directories specified by +``-fprebuilt-module-path``. Similarly, When importing a partition module unit +``M:P``, the compiler looks for ``M-P.pcm`` in the directories specified by +``-fprebuilt-module-path``. -* (1) When we import module M. The compiler would look up M.pcm in the directories specified - by ``-fprebuilt-module-path``. -* (2) When we import partition module unit M:P. The compiler would look up M-P.pcm in the - directories specified by ``-fprebuilt-module-path``. - -The option ``-fmodule-file=<path/to/BMI>`` tells the compiler to load the specified BMI directly. -The option ``-fmodule-file=<module-name>=<path/to/BMI>`` tells the compiler to load the specified BMI -for the module specified by ``<module-name>`` when necessary. The main difference is that +The ``-fmodule-file=<path/to/BMI>`` option causes the compiler to load the +specified BMI directly. The ``-fmodule-file=<module-name>=<path/to/BMI>`` +option causes the compiler to load the specified BMI for the module specified +by ``<module-name>`` when necessary. The main difference is that ``-fmodule-file=<path/to/BMI>`` will load the BMI eagerly, whereas -``-fmodule-file=<module-name>=<path/to/BMI>`` will only load the BMI lazily, which is similar -with ``-fprebuilt-module-path``. The option ``-fmodule-file=<path/to/BMI>`` for named modules is deprecated -and is planning to be removed in future versions. +``-fmodule-file=<module-name>=<path/to/BMI>`` will only load the BMI lazily, +which is similar to ``-fprebuilt-module-path``. The ---------------- erichkeane wrote:
```suggestion as will ``-fprebuilt-module-path``. The ``` https://github.com/llvm/llvm-project/pull/90237 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits