]> granicus.if.org Git - clang/commit
[PCH+Modules] Load -fmodule-map-file content before including PCHs
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 19 Jul 2018 12:32:06 +0000 (12:32 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Thu, 19 Jul 2018 12:32:06 +0000 (12:32 +0000)
commite89556485efbb31cc28b37605f5d59790efa8dd1
tree1c242135055e1a5e309c088d54ced61d41064de1
parentcdd3c71916d2060e1047d2e7bb688a1f442204ac
[PCH+Modules] Load -fmodule-map-file content before including PCHs

Consider:
1) Generate PCH with -fmodules and -fmodule-map-file
2) Use PCH with -fmodules and the same -fmodule-map-file

If we don't load -fmodule-map-file content before including PCHs,
the modules that are dependencies in PCHs cannot get loaded,
since there's no matching module map file when reading back the AST.

rdar://problem/40852867

Differential Revision: https://reviews.llvm.org/D48685

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337447 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/FrontendAction.cpp
test/Modules/module-imported-by-pch-with-modulemap.m [new file with mode: 0644]