[PATCH] D131388: [docs] Add "Standard C++ Modules"

Daniel Ruoso via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 25 06:18:11 PDT 2022


ruoso added a comment.

I just noticed that the document was implying that Header Units were separate from the Standard C++ Modules, but they are an integral part of the language in the specification of modules. The contrast that we do is between "Named Modules" and "Header Units". I did some edits to help convey that.



================
Comment at: clang/docs/CPlusPlus20Modules.rst:24-26
+Although the term ``modules`` has a unique meaning in C++20 Language Specification,
+when people talk about standard C++ modules, they may refer to another C++20 feature:
+header units, which are also covered in this document.
----------------



================
Comment at: clang/docs/CPlusPlus20Modules.rst:28-29
+
+standard C++ modules
+====================
+
----------------



================
Comment at: clang/docs/CPlusPlus20Modules.rst:285-287
+Another way to specify the dependent BMIs is to use ``-fmodule-file``. The main difference
+is that ``-fprebuilt-module-interface`` takes a directory, whereas ``-fmodule-file`` requires a
+specific file.
----------------
Which one takes precedence?


================
Comment at: clang/docs/CPlusPlus20Modules.rst:585-586
+
+Similar to modules, we could use ``--precompile`` to produce the BMI.
+But we need to specify that the input file is a header by ``-xc++-system-header`` or ``-xc++-user-header``.
+
----------------



================
Comment at: clang/docs/CPlusPlus20Modules.rst:728-729
+wrapping multiple headers together as a big module.
+However, these things are not part of C++20 Header units, and we want to avoid the impression that these
+additional semantics get interpreted as standard C++20 behavior.
+
----------------



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131388/new/

https://reviews.llvm.org/D131388



More information about the cfe-commits mailing list