Recover better from an incompatible .pcm file being provided by -fmodule-file=.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 2 Dec 2016 01:52:28 +0000 (01:52 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 2 Dec 2016 01:52:28 +0000 (01:52 +0000)
commit444e6f3d8203f197b430d4b649f0981ec1653085
treeb4065680559f0c59241b2285443da9a2333b1c4d
parentc3e24403f0c933a9e3fac6689ea008c097f424e2
Recover better from an incompatible .pcm file being provided by -fmodule-file=.
We try to include the headers of the module textually in this case, still
enforcing the modules semantic rules. In order to make that work, we need to
still track that we're entering and leaving the module. Also, if the module was
also marked as unavailable (perhaps because it was missing a file), we
shouldn't mark the module unavailable -- we don't need the module to be
complete if we're going to enter it textually.

llvm-svn: 288449
clang/include/clang/Lex/ModuleLoader.h
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Lex/PPDirectives.cpp
clang/test/Modules/config-mismatch.cpp [new file with mode: 0644]