[PATCH] D56438: [Modules] Allow modulemap path change for implicitly built modules
    Yuka Takahashi via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Tue Jan  8 06:42:56 PST 2019
    
    
  
yamaguchi created this revision.
yamaguchi added reviewers: rsmith, dblaikie.
Previous code was comparing the location of "modulemap which
is currently loaded and gives a definition of current module"
and "the location of the modulemap where the current implicit module was built".
This check was problematic for the usecase when installing modulemaps and prebuilt pcms
to other (e.g install) directories.
https://reviews.llvm.org/D56438
Files:
  clang/lib/Serialization/ASTReader.cpp
Index: clang/lib/Serialization/ASTReader.cpp
===================================================================
--- clang/lib/Serialization/ASTReader.cpp
+++ clang/lib/Serialization/ASTReader.cpp
@@ -3632,7 +3632,8 @@
 
     // Check the primary module map file.
     const FileEntry *StoredModMap = FileMgr.getFile(F.ModuleMapPath);
-    if (StoredModMap == nullptr || StoredModMap != ModMap) {
+    if (!PP.getPreprocessorOpts().DisablePCHValidation &&
+        (StoredModMap == nullptr || StoredModMap != ModMap)) {
       assert(ModMap && "found module is missing module map file");
       assert(ImportedBy && "top-level import should be verified");
       if ((ClientLoadCapabilities & ARR_OutOfDate) == 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56438.180656.patch
Type: text/x-patch
Size: 714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190108/48ac5ceb/attachment.bin>
    
    
More information about the cfe-commits
mailing list