[PATCH] D14353: Allow use of private headers in different sub-modules.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 16:10:15 PST 2015


rsmith added inline comments.

================
Comment at: lib/Lex/ModuleMap.cpp:235-237
@@ -234,5 +234,1 @@
   return IsPrivateRole &&
-         // FIXME: Should we map RequestingModule to its top-level module here
-         //        too? This check is redundant with the isSubModuleOf check in
-         //        diagnoseHeaderInclusion.
-         RequestedModule->getTopLevelModule() != RequestingModule;
----------------
We still have some duplication between this check...

================
Comment at: lib/Lex/ModuleMap.cpp:264-267
@@ -263,6 +261,6 @@
     for (const KnownHeader &Header : Known->second) {
       // If 'File' is part of 'RequestingModule' we can definitely include it.
       if (Header.getModule() &&
           Header.getModule()->isSubModuleOf(RequestingModule))
         return;
 
----------------
... and this one. I don't think we need both.


http://reviews.llvm.org/D14353





More information about the cfe-commits mailing list