[clang][modules] Skip submodule & framework re-definitions in module maps
authorJan Svoboda <jan_svoboda@apple.com>
Fri, 7 Jul 2023 02:27:48 +0000 (19:27 -0700)
committerJan Svoboda <jan_svoboda@apple.com>
Mon, 17 Jul 2023 20:50:25 +0000 (13:50 -0700)
commitdba2b5c9314e1d127ee5200e739e6c8ca53a9831
tree7bbf79447e41049fea247176b85e59874a5afaf5
parentbe014563f2f492658abcfa68cfaffc58a4ed7d9a
[clang][modules] Skip submodule & framework re-definitions in module maps

Before D150478, there were situations when Clang avoided parsing a module map because it was likely to re-define an already defined module (either by a PCM or by previously-found module map). Since Clang no longer performs that check and does parse the extra module map (due to the FW/FW_Private issue described in D150478), this patch re-implements the same semantics by skipping the duplicate definition of the framework module while parsing the module map.

Depends on D150478.

Reviewed By: benlangmuir

Differential Revision: https://reviews.llvm.org/D150479
clang/lib/Lex/ModuleMap.cpp
clang/test/Modules/no-check-relocated-fw-private-sub.c [new file with mode: 0644]
clang/test/Modules/shadow-framework.m [new file with mode: 0644]