r213838 - [modules] Slightly expand module semantics documentation.

Richard Smith richard-llvm at metafoo.co.uk
Wed Jul 23 20:42:39 PDT 2014


Author: rsmith
Date: Wed Jul 23 22:42:38 2014
New Revision: 213838

URL: http://llvm.org/viewvc/llvm-project?rev=213838&view=rev
Log:
[modules] Slightly expand module semantics documentation.

Modified:
    cfe/trunk/docs/Modules.rst

Modified: cfe/trunk/docs/Modules.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/Modules.rst?rev=213838&r1=213837&r2=213838&view=diff
==============================================================================
--- cfe/trunk/docs/Modules.rst (original)
+++ cfe/trunk/docs/Modules.rst Wed Jul 23 22:42:38 2014
@@ -208,7 +208,7 @@ Modules are modeled as if each submodule
 
 .. note::
 
-  This behavior is currently only approximated when building a module. Entities within a submodule that has already been built are visible when building later submodules in that module. This can lead to fragile modules that depend on the build order used for the submodules of the module, and should not be relied upon.
+  This behavior is currently only approximated when building a module with submodules. Entities within a submodule that has already been built are visible when building later submodules in that module. This can lead to fragile modules that depend on the build order used for the submodules of the module, and should not be relied upon. This behavior is subject to change.
 
 As an example, in C, this implies that if two structs are defined in different submodules with the same name, those two types are distinct types (but may be *compatible* types if their definitions match. In C++, two structs defined with the same name in different submodules are the *same* type, and must be equivalent under C++'s One Definition Rule.
 
@@ -216,6 +216,8 @@ As an example, in C, this implies that i
 
   Clang currently only performs minimal checking for violations of the One Definition Rule.
 
+If any submodule of a module is imported into any part of a program, the entire top-level module is considered to be part of the program. As a consequence of this, Clang may diagnose conflicts between an entity declared in an unimported submodule and an entity declared in the current translation unit, and Clang may inline or devirtualize based on knowledge from unimported submodules.
+
 Macros
 ------
 





More information about the cfe-commits mailing list