Skip to content

Commit ca5eb99

Browse files
yamaguchi1024vgvassilev
authored andcommitted
[cxxmodules] Don't complain when modulemap for implicit modules has changed
This patch (also) aims to make runtime module installable. This part of code in Clang is comparing the location of "modulemap which is currently loaded and gives a definition of current module (say, stl) and "the location of the modulemap where the current implicit module (like stl) was built". This was problematic for CMSSW, as they should install modulemaps and prebuilt pcms to other directory. stl and libc pcms should be prebuilt, installed and used from installed directory, so this check is redundant for that usecase.
1 parent a5e8afb commit ca5eb99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

interpreter/llvm/src/tools/clang/lib/Serialization/ASTReader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3887,7 +3887,8 @@ ASTReader::ReadModuleMapFileBlock(RecordData &Record, ModuleFile &F,
38873887

38883888
// Check the primary module map file.
38893889
const FileEntry *StoredModMap = FileMgr.getFile(F.ModuleMapPath);
3890-
if (StoredModMap == nullptr || StoredModMap != ModMap) {
3890+
if (!PP.getPreprocessorOpts().DisablePCHValidation &&
3891+
(StoredModMap == nullptr || StoredModMap != ModMap)) {
38913892
assert(ModMap && "found module is missing module map file");
38923893
assert(ImportedBy && "top-level import should be verified");
38933894
if ((ClientLoadCapabilities & ARR_OutOfDate) == 0)

0 commit comments

Comments
 (0)