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)
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)
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits