r298464 - [Modules] Rebuild modules on umbrella header mismatch
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 21 17:11:21 PDT 2017
Author: bruno
Date: Tue Mar 21 19:11:21 2017
New Revision: 298464
URL: http://llvm.org/viewvc/llvm-project?rev=298464&view=rev
Log:
[Modules] Rebuild modules on umbrella header mismatch
This restores behavior pre-r230064 since after PCMCache work (r298278)
we don't reload PCMs from disk within the same compiler invocation.
Testcases from r230064 are still left around since they still guarantee
the correct behavior we're expecting.
rdar://problem/19889777
Modified:
cfe/trunk/lib/Serialization/ASTReader.cpp
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=298464&r1=298463&r2=298464&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Tue Mar 21 19:11:21 2017
@@ -4890,13 +4890,9 @@ ASTReader::ReadSubmoduleBlock(ModuleFile
if (!CurrentModule->getUmbrellaHeader())
ModMap.setUmbrellaHeader(CurrentModule, Umbrella, Blob);
else if (CurrentModule->getUmbrellaHeader().Entry != Umbrella) {
- // 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;
+ if ((ClientLoadCapabilities & ARR_OutOfDate) == 0)
+ Error("mismatched umbrella headers in submodule");
+ return OutOfDate;
}
}
break;
More information about the cfe-commits
mailing list