diff options
author | Ben Langmuir <blangmuir@apple.com> | 2015-02-20 21:46:39 +0000 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2015-02-20 21:46:39 +0000 |
commit | bc35fbe43a6a37877d5421a25616fe7858e7dfe0 (patch) | |
tree | 56a422eb7417a5900782867c46fa6aabd81c7e20 /clang/lib/Serialization | |
parent | 0a3240f4de8077e3c64d04feb9089aff9b664271 (diff) | |
download | bcm5719-llvm-bc35fbe43a6a37877d5421a25616fe7858e7dfe0.tar.gz bcm5719-llvm-bc35fbe43a6a37877d5421a25616fe7858e7dfe0.zip |
Don't try to rebuild modules on umbrella header mismatch
There are two issues here:
1) It's too late to rebuild at this point, because we won't go through
removeModules and when we try to reload the new .pcm we'll get the old
one instead. We might be able to call removeModules after an OutOfDate
here, but I'm not yet confident that it is always safe to do so.
2) In practice, this check fails spuriously when the umbrella header
appears to change because of a VFS change that means it maps to a
different copy of the same file. Because of this, we just skip the
check for now.
llvm-svn: 230064
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index bb6a450222d..0ee2b2b2215 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -4578,9 +4578,13 @@ ASTReader::ReadSubmoduleBlock(ModuleFile &F, unsigned ClientLoadCapabilities) { if (!CurrentModule->getUmbrellaHeader()) ModMap.setUmbrellaHeader(CurrentModule, Umbrella); else if (CurrentModule->getUmbrellaHeader() != Umbrella) { - if ((ClientLoadCapabilities & ARR_OutOfDate) == 0) - Error("mismatched umbrella headers in submodule"); - return OutOfDate; + // This can be a spurious difference caused by changing the VFS to + // point to a different copy of the file, and it is too late to + // to rebuild safely. + // FIXME: If we wrote the virtual paths instead of the 'real' paths, + // after input file validation only real problems would remain and we + // could just error. For now, assume it's okay. + break; } } break; |